/* Product Strategy Analysis Styles */

/* Vision Board Specific Container */
.strategy-canvas-panel {
    padding: 2rem;
}

/* Vision Section (Full Width) */
.strategy-canvas-panel .vision-section {
    margin-bottom: 2rem;
}

.strategy-canvas-panel .vision-section .canvas-card {
    width: 100%;
}

/* Canvas Grid Groups with Equal Heights */
.strategy-canvas-panel .canvas-grid-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: stretch; /* This ensures equal heights */
}

.strategy-canvas-panel .canvas-grid-group .canvas-card {
    height: 100%; /* Fill the container height */
    display: flex;
    flex-direction: column;
}

.strategy-canvas-panel .canvas-grid-group .canvas-card .canvas-content {
    flex: 1; /* Takes up remaining space */
    display: flex;
    flex-direction: column;
}

/* Hide Implementation Timeline completely from Visual Analysis Section */
.visuals-panel .diagram-container[data-diagram="implementation-timeline"],
.visuals-panel .timeline-diagram-container,
.visuals-panel [data-diagram="implementation-timeline"] {
    display: none !important;
}

/* Hide the entire diagram card if it contains implementation timeline */
.visuals-panel .diagram-card {
    position: relative;
}

.visuals-panel .diagram-card:has([data-diagram="implementation-timeline"]) {
    display: none !important;
}



/* Editable Field Styles */
.editable-field {
    cursor: text;
    transition: all 0.2s ease;
    border-radius: 4px;
    padding: 2px 4px;
    margin: -2px -4px;
}

.editable-field:hover {
    background-color: rgba(102, 126, 234, 0.1);
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.editable-field:focus {
    background-color: rgba(102, 126, 234, 0.15);
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.4);
    outline: none;
}

.editable-field:focus::after {
    content: " ✏️";
    font-size: 0.8em;
    opacity: 0.7;
}

/* Preserve original styling for editable fields */
.editable-field.phase-header-h4 {
    color: #1e40af;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.editable-field.phase-duration {
    background: #3b82f6;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.editable-field.objective {
    background: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    margin-top: 0.5rem;
    color: #4a5568;
}

.editable-field.milestone-header-strong {
    color: #1e40af;
    font-size: 1rem;
}

.editable-field.milestone-date {
    background: #3b82f6;
    color: white;
    padding: 0.2rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
}

/* Results Overlay Styles */
.product-strategy-results-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f8fafc;
    z-index: 10000;
    overflow-y: auto;
    animation: fadeIn 0.3s ease-out;
}

.product-strategy-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 1.5rem;
    position: relative;
    top: 0;
    z-index: 1001;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.product-strategy-header.compact {
    padding: 0.75rem 1.5rem;
}

.product-strategy-header.compact .analysis-title h1 {
    font-size: 0;
    height: 0;
    margin: 0;
    opacity: 0;
    overflow: hidden;
}

.product-strategy-header.compact .analysis-subtitle {
    font-size: 0;
    height: 0;
    margin: 0;
    opacity: 0;
    overflow: hidden;
}

.product-strategy-header.compact .input-summary-wrapper {
    margin-top: 0;
}

.product-strategy-header.compact .input-summary {
    display: none;
}

.product-strategy-header.compact .toggle-summary-btn {
    display: none;
}

/* Compact styles for analysis-header class used in new flow */
.analysis-header.compact {
    padding: 0.75rem 1.5rem;
}

.analysis-header.compact .analysis-title h1 {
    font-size: 0;
    height: 0;
    margin: 0;
    opacity: 0;
    overflow: hidden;
}

.analysis-header.compact .analysis-subtitle {
    font-size: 0;
    height: 0;
    margin: 0;
    opacity: 0;
    overflow: hidden;
}

.product-strategy-header .header-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.product-strategy-header .analysis-title h1 {
    margin: 0 0 0.25rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.product-strategy-header .analysis-subtitle {
    opacity: 0.85;
    font-size: 0.85rem;
}

.product-strategy-header .header-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.product-strategy-header .action-btn {
    padding: 0.4rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s;
}

.product-strategy-header .action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.product-strategy-header .input-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.product-strategy-header .summary-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
}

.product-strategy-header .summary-card strong {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

/* Input Summary Toggle */
.product-strategy-header .input-summary-wrapper {
    margin-top: 0.5rem;
}

.product-strategy-header .toggle-summary-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s;
    margin-bottom: 0.5rem;
}

.product-strategy-header .toggle-summary-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.product-strategy-header .toggle-icon {
    transition: transform 0.2s ease;
    font-size: 0.7rem;
}

.product-strategy-header .input-summary.collapsed {
    display: none;
}

.product-strategy-header .input-summary:not(.collapsed) {
    display: grid;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 200px;
    }
}

/* Content Styles */
.product-strategy-content {

}

/* Changes Detected Nudge */
.changes-nudge {
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
    border: 1px solid #a855f7;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.15);
    animation: slideInDown 0.3s ease-out;
    position: sticky;
    top: 0.5rem;
    z-index: 1002;
}
@media (max-width: 768px) {
    .changes-nudge {
        top: 0.5rem;
        padding: 0.75rem 1rem;
        margin-bottom: 1rem;
    }
}

.changes-nudge .nudge-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.changes-nudge .nudge-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.changes-nudge .nudge-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.changes-nudge .nudge-text {
    flex: 1;
    font-size: 0.95rem;
    color: #581c87;
    font-weight: 500;
}

.changes-nudge .nudge-text strong {
    color: #4c1d95;
}

.changes-nudge .nudge-btn {
    background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(168, 85, 247, 0.3);
    flex-shrink: 0;
}

.changes-nudge .nudge-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.4);
    background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
}

.changes-nudge .nudge-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.changes-nudge .dismiss-nudge-btn {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(107, 114, 128, 0.3);
}

.changes-nudge .dismiss-nudge-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.4);
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-strategy-content .analysis-tabs {
    display: flex;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 2rem;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    gap: 0rem;
    margin-bottom: 0rem;
}

.product-strategy-content .analysis-tab {
    padding: 0.875rem 1.25rem;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    color: #4a5568;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
    font-size: 0.95rem;
}

.product-strategy-content .analysis-tab:hover {
    color: #2d3748;
    background: #f7fafc;
}

.product-strategy-content .analysis-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.product-strategy-content .analysis-tab svg {
    margin-right: 0.5rem;
    vertical-align: middle;
}

.product-strategy-content .tab-panel {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.product-strategy-content .tab-panel.active {
    display: block;
    padding: 0rem;
}

/* Implementation tab specific styling - no container */
.product-strategy-content .tab-panel[data-panel="implementation"] {
    background: transparent;
    padding: 0;
    margin: 0;
    border: none;
    box-shadow: none;
}

.product-strategy-content .tab-panel[data-panel="implementation"].active {
    background: transparent;
    padding: 0;
    margin: 0;
    border: none;
    box-shadow: none;
}

/* Actions & Risk tab specific styling - no container */
.product-strategy-content .tab-panel[data-panel="actions-risk"] {
    background: transparent;
    padding: 0;
    margin: 0;
    border: none;
    box-shadow: none;
}

.product-strategy-content .tab-panel[data-panel="actions-risk"].active {
    background: transparent;
    padding: 0;
    margin: 0;
    border: none;
    box-shadow: none;
}

/* Strategy Canvas Panel */
.strategy-canvas-panel .canvas-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Changed from 1.5fr 1fr to 1fr 1fr */
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    align-items: stretch;
}

.strategy-canvas-panel .canvas-card {
    background: white;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
    position: relative;
    display: flex;
    flex-direction: column;
}

.strategy-canvas-panel .canvas-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.strategy-canvas-panel .canvas-card h3, .strategy-canvas-panel .canvas-card h4 {
    margin: 0 0 1rem 0;
    color: #2d3748;
    font-size: 1.25rem;
    font-weight: 600;
    padding-bottom: 0.5rem;
}

.strategy-canvas-panel .canvas-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background-color: #ccc; /* Default color */
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.strategy-canvas-panel .vision-card {
    margin-bottom: 2rem;
    grid-column: 1 / -1;
}
.strategy-canvas-panel .vision-card::before {
    background-color: #D946EF;
}

.strategy-canvas-panel .target-group-card::before {
    background-color: #3B82F6;
}

.strategy-canvas-panel .needs-card::before {
    background-color: #10B981;
}

.strategy-canvas-panel .product-card {
    min-height: auto;
}
.strategy-canvas-panel .product-card::before {
    background-color: #EF4444;
}

.strategy-canvas-panel .business-goals-card::before {
    background-color: #F97316;
}

/* Vision Card Styles */
.strategy-canvas-panel .vision-attributes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.strategy-canvas-panel .attribute-tag {
    background: #f7fafc;
    color: #4a5568;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.strategy-canvas-panel .attribute-tag.inspiring {
    background: #fed7d7;
    color: #c53030;
}

.strategy-canvas-panel .attribute-tag.shared {
    background: #bee3f8;
    color: #2c5282;
}

.strategy-canvas-panel .attribute-tag.ambitious {
    background: #d6f5d6;
    color: #276749;
}

/* Target Group Styles */
.strategy-canvas-panel .target-groups {
    margin-bottom: 1rem;
}

.strategy-canvas-panel .target-item {
    background: #e6f3ff;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    /* Light blue background - matches target group card's blue theme */
}

.strategy-canvas-panel .target-item.primary {
    /* Removed border-left - relying on parent card's color coding */
}

.strategy-canvas-panel .target-item.secondary {
    opacity: 0.85;
    /* Removed border-left - using opacity to differentiate secondary */
}

.strategy-canvas-panel .target-item strong {
    color: #2d3748;
    font-size: 1.1rem;
}

.strategy-canvas-panel .target-item p {
    margin: 0.5rem 0;
    color: #4a5568;
}

.strategy-canvas-panel .attributes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.strategy-canvas-panel .attr-tag {
    background: #e2e8f0;
    color: #4a5568;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

/* Needs Styles */
.strategy-canvas-panel .primary-need {
    background: #f0fff4;
    padding: 1rem;
    border-radius: 8px;
    /* Removed border-left - parent card provides color coding */
    margin-bottom: 1rem;
}

.strategy-canvas-panel .need-details {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.strategy-canvas-panel .priority-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.strategy-canvas-panel .priority-badge.high {
    background: #28a745;
    color: white;
    /* Green badge - matches positive achievement theme for high priority goals */
}

.strategy-canvas-panel .priority-badge.medium {
    background: #17a2b8;
    color: white;
    /* Blue badge - matches steady progress theme for medium priority goals */
}

.strategy-canvas-panel .priority-badge.low {
    background: #6c757d;
    color: white;
    /* Neutral gray badge - understated for low priority goals */
}

.strategy-canvas-panel .outcome-badge {
    background: #e6fffa;
    color: #234e52;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.strategy-canvas-panel .secondary-needs {
    margin-top: 1rem;
}

.strategy-canvas-panel .need-item {
    background: #f7fafc;
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Product Styles */
.strategy-canvas-panel .product-type {
    background: #fff5f5;
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-weight: 500;
    color: #2d3748;
}

.strategy-canvas-panel .features-list {
    margin-bottom: 1rem;
}

.strategy-canvas-panel .feature-item {
    background: #f7fafc;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    /* Removed border-left - parent card provides color coding */
}

.strategy-canvas-panel .feature-item strong {
    color: #2d3748;
    font-size: 1.05rem;
}

.strategy-canvas-panel .feature-item p {
    margin: 0.5rem 0;
    color: #4a5568;
}

.strategy-canvas-panel .differentiator-tag {
    background: #e6fffa;
    color: #234e52;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.strategy-canvas-panel .competitive-advantage {
    background: #fff5f5;
    padding: 1rem;
    border-radius: 8px;
    /* Removed border-left - parent card provides color coding */
}

/* Business Goals Styles */
.strategy-canvas-panel .goal-item {
    background: #f7fafc;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.goal-item {
    border-left: none !important;
}

.strategy-canvas-panel .goal-item.high {
    /* Removed background - keeping neutral, priority shown via badge only */
}

.strategy-canvas-panel .goal-item.medium {
    /* Removed background - keeping neutral, priority shown via badge only */
}

.strategy-canvas-panel .goal-item.low {
    /* Removed background - keeping neutral, priority shown via badge only */
}

.strategy-canvas-panel .goal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.strategy-canvas-panel .goal-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.strategy-canvas-panel .metric,
.strategy-canvas-panel .timeframe {
    background: white;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #4a5568;
}

/* Strategic Insights */
.strategy-canvas-panel .strategy-insights {
    margin-top: 2rem;
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.strategy-canvas-panel .insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.strategy-canvas-panel .insight-card {
    background: #f7fafc;
    padding: 1rem;
    border-radius: 8px;
    /* Removed border-left - cleaner visual hierarchy */
}

.strategy-canvas-panel .insight-card h4 {
    margin: 0 0 0.5rem 0;
    color: #2d3748;
    font-size: 1.1rem;
}

.strategy-canvas-panel .insight-impact {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.75rem;
}

.strategy-canvas-panel .insight-impact.high {
    background: #28a745;
    color: white;
    /* Green badge - high impact insights are positive achievements */
}

.strategy-canvas-panel .insight-impact.medium {
    background: #17a2b8;
    color: white;
    /* Blue badge - medium impact insights show steady progress */
}

.strategy-canvas-panel .insight-impact.low {
    background: #6c757d;
    color: white;
    /* Neutral gray badge - low impact insights are de-emphasized */
}

/* Implementation Panel */
.implementation-panel {
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

/* Roadmap Configuration Controls */
.roadmap-configuration {
    margin-bottom: 2rem;
}

.config-container {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.config-container h4 {
    margin: 0 0 0.5rem 0;
    color: #1e293b;
    font-size: 1.2rem;
    font-weight: 600;
}

.config-subtitle {
    margin: 0 0 1.5rem 0;
    color: #64748b;
    font-size: 0.9rem;
}

.config-description {
    margin: 0 0 1.5rem 0;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.5;
}

.config-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.config-inputs {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.config-label {
    font-weight: 500;
    color: #374151;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.config-label::before {
    content: '';
    font-size: 0.8rem;
}

.config-label[for="timeframe-dropdown"]::before {
    content: '⏰';
    font-size: 0.8rem;
}

.config-label[for="team-size-dropdown"]::before {
    content: '👥';
    font-size: 0.8rem;
}

.config-dropdown {
    padding: 0.6rem 0.8rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    font-size: 0.85rem;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    min-width: 140px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.config-dropdown:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
}

.config-dropdown:hover {
    border-color: #4f46e5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.config-dropdown option {
    padding: 0.4rem;
    font-weight: 500;
}

.generate-roadmap-btn {
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.2);
}

.generate-roadmap-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.generate-roadmap-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
}

.generate-roadmap-btn:hover::before {
    left: 100%;
}

.generate-roadmap-btn:active {
    transform: translateY(0);
}

.generate-roadmap-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.generate-roadmap-btn .btn-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.config-help {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #1e40af;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.config-help .help-icon {
    font-size: 1rem;
}

/* Implementation Phases Section */
.implementation-phases-section {
    margin-bottom: 3rem;
}

.phases-container {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .config-container {
        padding: 1rem;
        margin: 0 0.5rem;
    }
    
    .phases-container {
        padding: 1rem;
        margin: 0 0.5rem;
    }
    
    .actions-risk-panel .action-container {
        padding: 1rem;
        margin: 0 0.5rem;
    }
    
    .actions-risk-panel .risk-container {
        padding: 1rem;
        margin: 0 0.5rem;
    }
}

.implementation-phases-section h4 {
    margin: 0 0 0.5rem 0;
    color: #1e293b;
    font-size: 1.2rem;
    font-weight: 600;
}

.phases-subtitle {
    margin: 0 0 1.5rem 0;
    color: #64748b;
    font-size: 0.9rem;
}

/* Implementation Timeline Section */
.implementation-timeline-section {
    margin-top: 3rem;
}

.timeline-container {
    background: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
}

.implementation-panel .roadmap-overview {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.implementation-panel .phases-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.implementation-panel .phase-card {
    background: #f7fafc;
    border-radius: 10px;
    padding: 1.5rem;
    border-left: 4px solid #667eea;
}

.implementation-panel .phase-header {
    display: grid;
    grid-template-columns: 6fr 4fr;
    justify-content: space-between;
    align-items: self-start;
    margin-bottom: 1rem;
}

.implementation-panel .phase-header h4 {
    margin: 0;
    color:#1e40af ;
    font-size: 1.25rem;
}

.implementation-panel .phase-duration {
    background: #667eea;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
}

.implementation-panel .phase-objectives {
    margin-bottom: 1rem;
}

.implementation-panel .objective {
    background: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    margin-top: 0.5rem;
    color: #4a5568;
}

.implementation-panel .phase-success-criteria {
    margin: 2rem 0;
}

.implementation-panel .phase-success-criteria ul {
    margin: 0.5rem 0 0 0;
    padding-left: 0;
    list-style: none !important;
}

.implementation-panel .phase-success-criteria li {
    color: #4a5568;
    margin-bottom: 0.25rem;
    position: relative;
    padding-left: 1.5rem;
}

.implementation-panel .phase-success-criteria li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #38b2ac;
    font-weight: bold;
}

.implementation-panel .phase-deliverables ul {
    margin: 0.5rem 0 0 0;
    padding-left: 1.25rem;
}

.implementation-panel .phase-deliverables li {
    color: #4a5568;
    margin-bottom: 0.25rem;
}

.implementation-panel .phase-resources {
    margin-top: 1.5rem;
    background: #f8fafc;
    border-radius: 6px;
}

.implementation-panel .phase-resources p {
    margin: 0;
    color: #374151;
    line-height: 1.5;
}

.implementation-panel .phase-dependencies {
    margin-top: 1.5rem;
}

.implementation-panel .phase-dependencies ul {
    margin: 0;
    padding-left: 1.5rem;
}

.implementation-panel .phase-dependencies li {
    margin-bottom: 0.5rem;
    color: #374151;
}

.implementation-panel .phase-milestones {
    margin-top: 1.5rem;
}

.implementation-panel .milestones-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.5rem;
}

.implementation-panel .milestone-item {
    padding: 1rem;
    background: #f0f9ff;
    border-radius: 6px;
    border: 1px solid #dbeafe;
}

.implementation-panel .milestone-header {
    display: grid;
    grid-template-columns: 7fr 5fr;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.implementation-panel .milestone-header strong {
    color: #1e40af;
    font-size: 1rem;
}

.implementation-panel .milestone-date {
    background: #3b82f6;
    color: white;
    padding: 0.2rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
}

.implementation-panel .milestone-item p {
    margin: 0;
    color: #374151;
    line-height: 1.5;
}

/* Action Items */
.implementation-panel .action-items {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.implementation-panel .actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

.implementation-panel .action-card {
    background: #f7fafc;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #a9a9a96e;
}

.implementation-panel .action-card.high {
    /* border-left-color: #f56565;*/
}

.implementation-panel .action-card.medium {
    /*border-left-color: #ed8936;*/
}

.implementation-panel .action-card.low {
    /*border-left-color: #38b2ac;*/
}

.implementation-panel .action-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.implementation-panel .action-details {
    display: grid;
    gap: 0.5rem;
}

.implementation-panel .owner,
.implementation-panel .timeframe,
.implementation-panel .success-criteria {
    background: white;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #4a5568;
}

/* Risk Considerations */
.implementation-panel .risk-considerations {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.implementation-panel .risks-list {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

.implementation-panel .risk-item {
    background: #f7fafc;
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid #a0aec0;
}

.implementation-panel .risk-item.high {
    border-left-color: #f56565;
    background: #fff5f5;
}

.implementation-panel .risk-item.medium {
    border-left-color: #ed8936;
    background: #fffaf0;
}

.implementation-panel .risk-item.low {
    border-left-color: #38b2ac;
    background: #f0fdfa;
}

.implementation-panel .risk-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.implementation-panel .severity-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.implementation-panel .severity-badge.high {
    background: #fed7d7;
    color: #c53030;
}

.implementation-panel .severity-badge.medium {
    background: #feebc8;
    color: #c05621;
}

.implementation-panel .severity-badge.low {
    background: #e6fffa;
    color: #234e52;
}

.implementation-panel .risk-details {
    display: grid;
    gap: 0.5rem;
}

.implementation-panel .impact,
.implementation-panel .mitigation {
    background: white;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #4a5568;
}

/* Actions & Risk Panel Enhancements */
.actions-risk-panel .panel-intro {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #667eea;
    display: none;
}

.actions-risk-panel .panel-intro h3 {
    margin: 0 0 1rem 0;
    color: #1e293b;
    font-size: 1.4rem;
    font-weight: 600;
}

.actions-risk-panel .panel-intro p {
    margin: 0;
    color: #64748b;
    line-height: 1.6;
}

.panel-intro{
    display: none;
}

.actions-risk-panel .action-items-section {
    margin-bottom: 2rem;
    margin-top: 0rem;
}

.actions-risk-panel .action-container {
    background: white;
    border-radius: 12px;
    padding: 0.75rem;
    /* box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important; */
}

.actions-risk-panel .action-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.actions-risk-panel .action-header-row h4 {
    margin: 0;
    color: #1e293b;
    font-size: 1.2rem;
    font-weight: 600;
}

.actions-risk-panel .priority-summary {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.actions-risk-panel .priority-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.actions-risk-panel .priority-number {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.actions-risk-panel .priority-number.high {
    color: #dc2626;
}

.actions-risk-panel .priority-number.medium {
    color: #d97706;
}

.actions-risk-panel .priority-number.low {
    color: #059669;
}

.actions-risk-panel .priority-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}



.actions-risk-panel .risk-assessment-section {
    margin-bottom: 2rem;
}

.actions-risk-panel .risk-container {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;  
}

.actions-risk-panel .risk-assessment-section h4 {
    margin: 0 0 1.5rem 0;
    color: #1e293b;
    font-size: 1.2rem;
    font-weight: 600;
    /* border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem; */
}

.visuals-panel .litethink-value {
    border-radius: 12px;
    padding: 2rem;
    color: white;
    margin-top: -2rem;
    text-align: center;
}

.visuals-panel .value-callout h4 {
    margin: 0 0 1rem 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: black;
}

.visuals-panel .value-callout p {
    margin: 0;
    line-height: 1.7;
    opacity: 0.95;
    color: black;
    font-size: 0.95rem;
}

/* Enhanced Priority and Severity Badges */
.actions-risk-panel .priority-badge,
.actions-risk-panel .severity-badge {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Visuals Panel */
.visuals-panel .diagram-section {
    margin-bottom: 2rem;
}

.visuals-panel .diagram-grid {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    padding-top: 0rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.visuals-panel .diagram-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.visuals-panel .diagram-card h3 {
    margin: 0 0 0.5rem 0;
    color: #2d3748;
    font-size: 1.25rem;
    font-weight: 600;
    /* border-bottom: 2px solid #e2e8f0; */
    padding-bottom: 0.5rem;
}

.visuals-panel .diagram-description {
    margin: 0 0 1rem 0;
    color: #4a5568;
    font-size: 0.9rem;
    line-height: 1.5;
    font-style: italic;
}

.visuals-panel .diagram-container {
    background: #f7fafc;
    border-radius: 8px;
    padding: 0rem;
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.visuals-panel .mermaid-diagram {
    width: 100%;
    text-align: center;
}

/* Enhanced styling for flywheel diagrams */
.visuals-panel .diagram-container[data-diagram="growthFlywheel"] {
    /* Remove all special styling - use standard container styling */
}

/* No Diagrams Message */
.visuals-panel .no-diagrams-message {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    border: 2px dashed #e2e8f0;
    color: #64748b;
    grid-column: 1 / -1; /* Span full width in grid */
}

.visuals-panel .no-diagrams-message h3 {
    margin: 0 0 1rem 0;
    color: #475569;
    font-size: 1.25rem;
    font-weight: 600;
}

.visuals-panel .no-diagrams-message p {
    margin: 0;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Progress Message Styles */
.analysis-progress-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
    min-width: 300px;
}

.analysis-progress-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.progress-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.progress-text {
    font-weight: 600;
    color: #2d3748;
    font-size: 1.1rem;
}

.progress-subtext {
    color: #718096;
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .strategy-canvas-panel .canvas-grid {
        grid-template-columns: 1fr;
    }
    
    .strategy-canvas-panel .canvas-grid-group {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .config-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .config-inputs {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .generate-roadmap-btn {
        align-self: flex-start;
    }
    
    .product-strategy-modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .product-strategy-header {
        padding: 1rem;
    }
    
    .product-strategy-header .header-main {
        flex-direction: column;
        gap: 1rem;
    }
    
    .product-strategy-header .input-summary {
        grid-template-columns: 1fr;
    }
    
    .product-strategy-content {
        padding: 1rem;
    }

    .changes-nudge {
        padding: 0.75rem 1rem;
        margin-bottom: 1rem;
    }

    .changes-nudge .nudge-content {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    .changes-nudge .nudge-text {
        font-size: 0.9rem;
    }

    .changes-nudge .nudge-btn {
        width: 100%;
        padding: 0.875rem 1rem;
    }
    
    .changes-nudge .nudge-actions {
        width: 100%;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .strategy-canvas-panel .canvas-grid {
        grid-template-columns: 1fr;
    }
    
    .implementation-panel .phases-timeline {
        grid-template-columns: 1fr;
    }
    
    .implementation-panel .actions-grid {
        grid-template-columns: 1fr;
    }
    
    .strategy-canvas-panel .goal-details {
        grid-template-columns: 1fr;
    }
    
    .strategy-canvas-panel .need-details {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .product-strategy-modal .modal-actions {
        flex-direction: column;
    }
    
    .product-strategy-content .analysis-tabs {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .product-strategy-content .analysis-tab {
        font-size: 0.85rem;
        padding: 0.75rem 1rem;
    }
    
    .visuals-panel .diagram-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .actions-risk-panel .action-header-row {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .actions-risk-panel .priority-summary {
        gap: 1rem;
    }
    
    .visuals-panel .diagram-container[data-diagram="growthFlywheel"] {
        padding: 1rem;
        border-radius: 15px;
    }
} 

h3{
    margin-bottom: 1rem;
}

/* NEW FLOW: Edit Controls */
.canvas-edit-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.edit-strategy-btn, .save-changes-btn, .cancel-edit-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.edit-strategy-btn {
    background: #3b82f6;
    color: white;
}

.edit-strategy-btn:hover {
    background: #2563eb;
}

.save-changes-btn {
    background: #10b981;
    color: white;
}

.save-changes-btn:hover {
    background: #059669;
}

.cancel-edit-btn {
    background: #6b7280;
    color: white;
}

.cancel-edit-btn:hover {
    background: #4b5563;
}

.confirm-strategy-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-left: auto;
}

.confirm-strategy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Edit Fields */
.edit-field {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    resize: vertical;
    font-family: inherit;
}

.edit-field:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Disabled Tabs */
.analysis-tab.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Executive-grade Loading Tabs */
.analysis-tab.loading {
    position: relative;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: #1e40af;
    cursor: default;
    pointer-events: auto;
    opacity: 1;
    border-left: 3px solid #3b82f6;
}

.analysis-tab.loading:hover {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    transform: translateY(-1px);
}

.tab-loading-indicator {
    position: absolute;
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #1e40af;
    font-size: 11px;
    font-weight: 500;
}

.tab-loading-indicator::before {
    content: "●●●";
    animation: loadingDots 1.5s infinite;
    color: #3b82f6;
    letter-spacing: 2px;
}

.tab-loading-indicator .loading-spinner {
    display: none;
}

.analysis-tab.loading .tab-loading-indicator {
    animation: pulse 2s ease-in-out infinite;
}

.analysis-tab.loading .tab-progress-indicator {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes loadingDots {
    0%, 20% { opacity: 0.3; }
    50% { opacity: 1; }
    80%, 100% { opacity: 0.3; }
}

/* Fallback hint for executive users */
.pulse-hint {
    animation: pulseHint 2s infinite;
    opacity: 0.7;
    margin-left: 0.5rem;
}

@keyframes pulseHint {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

/* Executive Timeline Controls */
.timeline-controls {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.timeline-selector {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.timeline-row {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.timeline-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 200px;
}

.timeline-label {
    font-weight: 600;
    color: #334155;
    font-size: 0.95rem;
    margin: 0;
    white-space: nowrap;
}

.timeline-options {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.timeline-btn {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    color: #64748b;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-width: fit-content;
}

.timeline-btn:hover {
    border-color: #3b82f6;
    color: #1e40af;
    background: #eff6ff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.15);
}

.timeline-btn.active {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    border-color: #1e40af;
    color: #ffffff;
    box-shadow: 0 3px 8px rgba(59, 130, 246, 0.3);
}

.timeline-btn.active:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    transform: translateY(-1px);
}

.regenerate-roadmap-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: #ffffff;
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    margin-left: auto;
}

.regenerate-roadmap-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(16, 185, 129, 0.3);
}

.regenerate-roadmap-btn:active {
    transform: translateY(0);
}

.regenerate-roadmap-btn .btn-icon {
    font-size: 1rem;
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    .timeline-selector {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .timeline-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .timeline-group {
        min-width: auto;
    }
    
    .timeline-options {
        justify-content: center;
    }
    
    .regenerate-roadmap-btn {
        margin-left: 0;
        justify-content: center;
    }
}

/* Executive-Grade Progress Indicators */
.tab-progress-indicator {
    position: absolute;
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #1e40af;
    font-size: 11px;
    font-weight: 500;
}

.progress-circle {
    width: 24px;
    height: 24px;
    border: 2px solid #3b82f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    position: relative;
    overflow: hidden;
}

.progress-circle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: conic-gradient(
        from 0deg,
        #3b82f6 0deg,
        #3b82f6 120deg,
        transparent 120deg,
        transparent 360deg
    );
    border-radius: 50%;
    animation: progressSpin 2s linear infinite;
}

.progress-step {
    position: relative;
    z-index: 1;
    font-size: 10px;
    font-weight: 700;
    color: #1e40af;
    background: #eff6ff;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-label {
    font-size: 11px;
    color: #1e40af;
    font-weight: 500;
}

@keyframes progressSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Executive Skeleton UI System */
.skeleton-container {
    padding: 2rem;
    background: #ffffff;
    border-radius: 12px;
    max-width: 100%;
}

.skeleton-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.skeleton-progress {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.progress-indicator {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #1e40af);
    border-radius: 3px;
    animation: progressFill 3s ease-in-out infinite;
}

.implementation-progress {
    width: 60%;
    animation-delay: 0s;
}

.actions-progress {
    width: 75%;
    animation-delay: 0.5s;
}

.visuals-progress {
    width: 85%;
    animation-delay: 1s;
}

.generic-progress {
    width: 50%;
    animation-delay: 0.25s;
}

.progress-text {
    font-size: 0.875rem;
    color: #475569;
    font-weight: 500;
}

@keyframes progressFill {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* Skeleton Content Styles */
.skeleton-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.skeleton-line {
    height: 16px;
    background: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 50%, #f1f5f9 100%);
    border-radius: 8px;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
}

.skeleton-line.wide {
    width: 85%;
}

.skeleton-line.narrow {
    width: 45%;
}

.skeleton-line.skeleton-label {
    width: 120px;
    height: 14px;
}

@keyframes skeletonShimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

/* Implementation Skeleton Styles */
.skeleton-timeline-controls {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.skeleton-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.skeleton-btn {
    width: 80px;
    height: 36px;
    background: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 50%, #f1f5f9 100%);
    border-radius: 8px;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
}

.skeleton-btn.active-shimmer {
    background: linear-gradient(90deg, #dbeafe 0%, #bfdbfe 50%, #dbeafe 100%);
}

.skeleton-action-btn {
    width: 140px;
    height: 36px;
    background: linear-gradient(90deg, #dcfce7 0%, #bbf7d0 50%, #dcfce7 100%);
    border-radius: 8px;
    margin-left: auto;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
}

.skeleton-phases {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.skeleton-phase-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
}

.skeleton-phase-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.skeleton-phase-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Actions & Risk Skeleton Styles */
.skeleton-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.skeleton-metric-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.skeleton-metric-number {
    width: 40px;
    height: 32px;
    background: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 50%, #f1f5f9 100%);
    border-radius: 8px;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
}

.skeleton-actions-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.skeleton-action-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.skeleton-priority-badge {
    width: 60px;
    height: 24px;
    background: linear-gradient(90deg, #fef3c7 0%, #fde68a 50%, #fef3c7 100%);
    border-radius: 12px;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
}

.skeleton-action-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Visuals Skeleton Styles */
.skeleton-diagram-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.skeleton-diagram-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.skeleton-diagram-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skeleton-diagram-area {
    width: 100%;
    height: 200px;
    background: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 50%, #f1f5f9 100%);
    border-radius: 8px;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.skeleton-diagram-area::before {
    content: '📊';
    font-size: 2rem;
    opacity: 0.3;
    animation: fadeInOut 2s ease-in-out infinite;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.1; }
    50% { opacity: 0.3; }
}

/* Generic Skeleton Styles */
.skeleton-generic {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Responsive Skeleton Design */
@media (max-width: 768px) {
    .skeleton-container {
        padding: 1rem;
    }
    
    .skeleton-timeline-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .skeleton-buttons {
        justify-content: center;
    }
    
    .skeleton-action-btn {
        margin-left: 0;
    }
    
    .skeleton-diagram-grid {
        grid-template-columns: 1fr;
    }
    
    .skeleton-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Preview Panel Loading States */
.preview-loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    height: 100%;
    min-height: 200px;
}

.preview-loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.preview-progress-circle {
    width: 48px;
    height: 48px;
    border: 3px solid #e2e8f0;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-progress-fill {
    width: 36px;
    height: 36px;
    background: conic-gradient(
        from 0deg,
        #3b82f6 0deg,
        #3b82f6 90deg,
        transparent 90deg,
        transparent 360deg
    );
    border-radius: 50%;
    animation: previewProgressSpin 2s linear infinite;
}

.preview-loading-text {
    color: #475569;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    margin: 0;
    line-height: 1.4;
    max-width: 280px;
}

@keyframes previewProgressSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Loading Panel */
.loading-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: #6b7280;
    font-style: italic;
}

.loading-panel .loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

/* Inline Edit Styles */
.card-header {
    display: flex;
    justify-content: space-between;
}

.card-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.canvas-content {
    flex-grow: 1;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
}

.edit-section-btn,
.save-section-btn,
.cancel-section-btn {
    padding: 0.25rem 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.edit-section-btn {
    background: transparent;
    border: none;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6B7280;
    transition: all 0.2s;
}

.edit-section-btn:hover {
    background: #E5E7EB;
    color: #111827;
}

/* Save Button - Updated Design */
.save-section-btn {
    display: inline-flex;
    align-items: center;
    background: #22c55e;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.90rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(34,197,94,0.08);
    margin-right: 0.25rem;
}

.save-section-btn svg {
    margin-right: 0.4rem;
    width: 16px;
    height: 16px;
}

.save-section-btn:hover {
    background: #16a34a;
}

/* Cancel Button - Updated Design */
.cancel-section-btn {
    display: inline-flex;
    align-items: center;
    background: #fff;
    color: #334155;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.90rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border 0.2s;
}

.cancel-section-btn svg {
    margin-right: 0.4rem;
    width: 16px;
    height: 16px;
}

.cancel-section-btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

/* Business Goals Edit Interface */
.business-goals-edit-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.goal-edit-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    position: relative;
    transition: all 0.2s ease;
}

.goal-edit-card.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.goal-edit-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.goal-drag-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    cursor: grab;
    flex-shrink: 0;
    color: #94a3b8;
    transition: all 0.2s ease;
    padding: 4px;
    border-radius: 4px;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.goal-drag-handle:hover {
    color: #64748b;
    background: #f1f5f9;
    transform: scale(1.1);
}

.goal-edit-card.dragging .goal-drag-handle {
    cursor: grabbing;
    color: #475569;
}

.goal-drag-handle:active {
    cursor: grabbing;
    transform: scale(1.05);
}

.goal-edit-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.goal-edit-main {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.goal-description-input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 0.9rem;
    background: white;
}

.goal-priority-select {
    padding: 0.5rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    min-width: 100px;
    background: white;
}

.goal-edit-details {
    display: flex;
    gap: 1rem;
}

.goal-detail-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.goal-detail-field label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
}

.goal-target-input,
.goal-timeframe-input {
    padding: 0.5rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 0.85rem;
    background: white;
}

.goal-delete-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 4px;
    color: #ef4444;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    opacity: 0.8;
}

.goal-delete-btn:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    opacity: 1;
    transform: scale(1.1);
}

.add-goal-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.add-goal-btn:hover {
    border-color: #94a3b8;
    background: #f1f5f9;
    color: #475569;
}

/* Product Features Edit Interface */
.product-features-edit-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-feature-edit {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.2s;
    position: relative;
}

.product-feature-edit.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.product-feature-edit:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.feature-drag-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: #94a3b8;
    cursor: grab;
    flex-shrink: 0;
    transition: color 0.2s;
}

.feature-drag-handle:hover {
    color: #64748b;
}

.product-feature-edit.dragging .feature-drag-handle {
    cursor: grabbing;
}

.feature-drag-handle:active {
    cursor: grabbing;
}

.feature-edit-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.feature-delete-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 4px;
    color: #ef4444;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    opacity: 0.8;
}

.feature-delete-btn:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    opacity: 1;
    transform: scale(1.1);
}

.add-feature-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.add-feature-btn:hover {
    border-color: #94a3b8;
    background: #f1f5f9;
    color: #475569;
}

/* Needs Edit Interface */
.needs-edit-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.primary-need-edit {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.primary-need-edit h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}

.needs-edit-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    background: white;
    color: #2d3748;
    transition: border-color 0.2s;
}

.needs-edit-textarea:focus {
    outline: none;
    border-color: #10B981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.needs-priority-dropdown {
    padding: 0.5rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    background: white;
    color: #4a5568;
    cursor: pointer;
    transition: border-color 0.2s;
    align-self: flex-start;
}

.secondary-needs-edit {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.secondary-needs-edit h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}

.secondary-need-edit-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.need-edit-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.delete-need-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 4px;
    color: #ef4444;
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0.8;
}

.delete-need-btn:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    opacity: 1;
    transform: scale(1.1);
}

.add-need-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.add-need-btn:hover {
    border-color: #94a3b8;
    background: #f1f5f9;
    color: #475569;
}

.inline-edit-field {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    font-size: 0.9rem;
    font-family: inherit;
    margin-bottom: 0.5rem;
    transition: all 0.2s;
    resize: vertical;
}

.inline-edit-field:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 2px rgba(49, 130, 206, 0.1);
}

.inline-edit-field[type="text"],
.inline-edit-field[type="number"] {
    height: 2.5rem;
    resize: none;
}

.inline-edit-field[rows] {
    min-height: 2.5rem;
}

.inline-edit-field select {
    background: white;
}

/* Edit mode styling */
.canvas-card.editing {
    border: 2px solid #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.canvas-card.editing .card-header {
    background: #ebf8ff;
    border-bottom-color: #3182ce;
}

/* Change indicators */
.change-indicator {
    font-size: 0.75rem;
    margin-right: 0.5rem;
    animation: pulse 2s infinite;
}

.ai-indicator {
    font-size: 0.75rem;
    margin-right: 0.5rem;
    color: #2563eb;
    vertical-align: middle;
    /* Optionally add a subtle animation */
}

.canvas-card.modified {
    border-left: 3px solid #e53e3e;
}

.canvas-card.modified .card-header {
    border-bottom-color: #e53e3e;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Regenerate strategy button */
.regenerate-strategy-btn {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%) !important;
    color: white !important;
    border: none !important;
    font-weight: 600 !important;
}

.regenerate-strategy-btn:hover {
    background: linear-gradient(135deg, #2f855a 0%, #276749 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(56, 161, 105, 0.4) !important;
}

.regenerate-strategy-btn:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* Responsive adjustments for edit buttons */
@media (max-width: 768px) {
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .card-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .edit-section-btn,
    .save-section-btn,
    .cancel-section-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .change-indicator {
        font-size: 0.7rem;
        margin-right: 0.25rem;
    }
}

.refine-impact-summary {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.97rem;
}
.refine-impact-summary .reasoning {
  color: #1f2937;
  line-height: 1.5;
}
.refine-impact-summary .reasoning strong {
  color: #374151;
  font-weight: 600;
}
.refine-impact-summary .icon {
  margin-right: 0.5em;
}

/* Temporary sticky refine impact summary */
.refine-impact-summary.temp-sticky {
  transition: all 0.3s ease-out;
}

/* Ensure smooth transitions when sticky positioning is applied/removed */
.refine-impact-summary {
  transition: all 0.3s ease-out;
}

/* Animation for temporary sticky summary appearance */
@keyframes tempStickySlideIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.refine-impact-summary.temp-sticky {
  animation: tempStickySlideIn 0.3s ease-out;
}

/* Item-level AI update indicators */
.ai-updated {
    position: relative;
    background: rgba(59, 130, 246, 0.05);
    border-left: 3px solid #3b82f6;
    padding-left: 0.75rem;
    border-radius: 0 6px 6px 0;
}

.ai-updated .ai-indicator {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    margin-left: 0;
}

/* Specific item styling for different card types */
.target-item.ai-updated,
.need-item.ai-updated,
.feature-item.ai-updated,
.goal-item.ai-updated {
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
}

.vision-statement.ai-updated,
.primary-need.ai-updated,
.product-type.ai-updated,
.competitive-advantage.ai-updated {
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
}

/* Refine Impact Summary Close Button */
.refine-impact-summary {
    position: relative;
}

.refine-summary-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    color: #64748b;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.refine-summary-close:hover {
    background: rgba(0, 0, 0, 0.2);
    color: #374151;
    transform: scale(1.1);
}

.refine-summary-close:active {
    transform: scale(0.95);
}

/* New Product UI Styles */
.product-display {
    display: flex;
    flex-direction: column;
}

.product-main-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
}

.product-features {
    display: flex;
    flex-direction: column;
}

.product-feature-card {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
}

.product-feature-card .feature-title {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.product-feature-card .feature-description {
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.product-feature-card .feature-tag {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #374151;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.product-summary {
    background: #fef2f2;
    border-radius: 8px;
    padding: 1rem;
    color: #1f2937;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Product Edit UI Styles */
.product-edit {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.product-name-edit {
    margin-bottom: 1rem;
}

.product-name-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    background: white;
}

.product-name-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.product-features-edit {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-feature-edit {
    background: #f9fafb;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #e5e7eb;
}

.feature-edit-title {
    margin-bottom: 0.75rem;
}

.feature-name-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1f2937;
    background: white;
}

.feature-name-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.feature-edit-tag {
    margin-bottom: 0.75rem;
}

.feature-tag-select {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #374151;
    background: white;
    cursor: pointer;
}

.feature-tag-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.feature-edit-description {
    margin-bottom: 0.5rem;
}

.feature-description-textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #6b7280;
    background: white;
    resize: vertical;
    min-height: 60px;
}

.feature-description-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.product-summary-edit {
    margin-top: 1rem;
}

.product-summary-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #1f2937;
    background: white;
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

.product-summary-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .product-main-title {
        font-size: 1.25rem;
    }
    
    .product-feature-card {
        padding: 0.75rem;
    }
    
    .product-feature-card .feature-tag {
        position: static;
        display: inline-block;
        margin-top: 0.5rem;
    }
    
    .product-edit {
        gap: 1rem;
    }
    
    .product-feature-edit {
        padding: 0.75rem;
    }
}

/* Target Group UI Styles */
.target-group-display {
    flex-direction: column;
}

.primary-target-section {
}

.target-group-card {
    background: #eef5ff;
    padding: 1.5rem;
}

.target-group-card.primary {
    background: #ffffff;
}

.target-group-card.secondary {
    background: #ffffff;
    padding-top: 0rem;
    padding-bottom: 0rem;
}

.target-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.75rem;
}

.target-description {
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.target-keywords {
    color: #6b7280;
    font-size: 0.85rem;
    font-style: italic;
}

.secondary-targets-section {
    margin-top: 1rem;
}

.secondary-targets-title {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
    font-size: 1rem;
}

/* Target Group Edit UI Styles */
.target-group-edit {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.primary-target-edit {
    margin-bottom: 1rem;
}

.target-group-edit-card {
    background: #f9fafb;
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
}

.target-group-edit-card.primary {
    /* Removed colored left border */
}

.target-group-edit-card.secondary {
    /* Removed colored left border */
}

.target-title-edit {
    margin-bottom: 1rem;
}

.target-title-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    background: white;
}

.target-title-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.target-description-edit {
    margin-bottom: 1rem;
}

.target-description-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #6b7280;
    background: white;
    resize: vertical;
    min-height: 80px;
    line-height: 1.6;
}

.target-description-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.target-keywords-edit {
    margin-top: 1rem;
}

.keywords-label {
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.keywords-input-container {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.keywords-input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #6b7280;
    background: white;
}

.keywords-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.add-keyword-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    color: #374151;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.add-keyword-btn:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

.add-keyword-btn svg {
    width: 12px;
    height: 12px;
}

/* Responsive adjustments for target group */
@media (max-width: 768px) {
    .target-group-card,
    .target-group-edit-card {
        padding: 1rem;
    }
    
    .keywords-input-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .add-keyword-btn {
        justify-content: center;
    }
}

/* Tab Indicator (Blue Dot) */
.tab-indicator {
    margin-left: 0.5rem;
    font-size: 0.8rem;
}

.tab-indicator.blinking {
    animation: blueDotBlink 2s infinite;
}

@keyframes blueDotBlink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0.3;
    }
}

.goal-dot-indicator {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    margin-left: 0.5em;
    vertical-align: middle;
    background: #2563eb; /* default blue */
}
.goal-dot-indicator.red {
    background: #ef4444;
}
.goal-dot-indicator.blue {
    background: #2563eb;
}

/* Content Preview Layout */
.content-preview-layout {
    display: flex;
    gap: 1.5rem;
    height: calc(100vh - 200px);
    min-height: 600px;
}

.content-preview-layout .analysis-tab-content {
    flex: 1;
    overflow-y: auto;
    padding-right: 1rem;
}

/* Preview Panel */
.product-strategy-content .preview-panel {
    width: 400px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    position: relative;
}

.product-strategy-content .preview-panel.collapsed {
    width: 60px;
}

.preview-panel.collapsed .preview-panel-header h3,
.preview-panel.collapsed .preview-panel-content {
    display: none;
}

.preview-panel.collapsed .toggle-icon {
    transform: rotate(180deg);
}

.preview-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 12px 12px 0 0;
    cursor: grab;
    user-select: none;
}

.preview-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.drag-indicator {
    color: #9ca3af;
    font-size: 12px;
    cursor: grab;
    user-select: none;
}

.drag-indicator:active {
    cursor: grabbing;
}

.preview-panel-header:active {
    cursor: grabbing;
}

.preview-panel-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
}

.preview-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.preview-minimize-btn,
.preview-maximize-btn,
.preview-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    color: #6b7280;
    font-size: 16px;
    transition: all 0.2s ease;
}

.preview-resize-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    color: #6b7280;
    font-size: 14px;
    transition: all 0.2s ease;
}

.preview-minimize-btn:hover,
.preview-maximize-btn:hover,
.preview-close-btn:hover,
.preview-resize-btn:hover {
    background: #e5e7eb;
    color: #374151;
}

.preview-close-btn:hover {
    background: #ef4444;
    color: white;
}

.preview-panel-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s;
    color: #64748b;
}

.preview-panel-toggle:hover {
    background: #e2e8f0;
    color: #2d3748;
}

.toggle-icon {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.preview-panel-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1rem;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.preview-panel-content::-webkit-scrollbar {
    width: 6px;
}

.preview-panel-content::-webkit-scrollbar-track {
    background: transparent;
}

.preview-panel-content::-webkit-scrollbar-thumb {
    background: rgba(156, 163, 175, 0.5);
    border-radius: 3px;
}

.preview-panel-content::-webkit-scrollbar-thumb:hover {
    background: rgba(156, 163, 175, 0.8);
}

.preview-placeholder {
    text-align: center;
    color: #64748b;
    font-style: italic;
    padding: 2rem 1rem;
}

.preview-placeholder p {
    margin: 0;
    font-size: 0.95rem;
}

/* Preview Content Styles (moved from modal) */
.preview-panel .preview-content-area {
    padding: 0;
}

.preview-panel .comparison-view {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.preview-panel .section-pair {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #e2e8f0;
}

.preview-panel .current-section,
.preview-panel .proposed-section {
    margin-bottom: 1rem;
}

.preview-panel .current-section:last-child,
.preview-panel .proposed-section:last-child {
    margin-bottom: 0;
}

.preview-panel .section-label {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.preview-panel .current-section .section-label {
    color: #dc2626;
}

.preview-panel .proposed-section .section-label {
    color: #059669;
}

.preview-panel .section-content {
    background: white;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.preview-panel .preview-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.preview-panel .preview-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.preview-panel .keep-current-btn {
    background: #f3f4f6;
    color: #374151;
}

.preview-panel .keep-current-btn:hover {
    background: #e5e7eb;
}

.preview-panel .update-section-btn {
    background: #059669;
    color: white;
}

.preview-panel .update-section-btn:hover {
    background: #047857;
}

.preview-panel .btn-icon {
    font-size: 1rem;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .content-preview-layout {
        flex-direction: column;
        height: auto;
    }
    
    .preview-panel {
        width: 100%;
        max-height: 400px;
    }
    
    .preview-panel.collapsed {
        width: 100%;
        max-height: 60px;
    }
    
    .content-preview-layout .analysis-tab-content {
        padding-right: 0;
    }
}

@media (max-width: 768px) {
    .content-preview-layout {
        gap: 1rem;
    }
    
    .preview-panel {
        max-height: 350px;
    }
    
    .preview-panel-header {
        padding: 0.75rem 1rem;
    }
    
    .preview-panel-content {
        padding: 0rem;
    }
    
    .preview-panel .preview-actions {
        flex-direction: column;
    }
}

/* Preview Panel Hidden State */
.product-strategy-content .preview-panel.hidden {
    display: none;
}

/* Floating Preview Panel */
.product-strategy-content .preview-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 380px;
    max-height: 500px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(229, 231, 235, 0.8);
    transition: all 0.3s ease;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.product-strategy-content .preview-panel.wide {
    width: 520px;
}

.product-strategy-content .preview-panel:hover {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
}

.product-strategy-content .preview-panel.minimized {
    width: 60px;
    height: 60px;
    max-height: 60px;
    border-radius: 50%;
    cursor: pointer;
}

.preview-panel.minimized .preview-panel-content,
.preview-panel.minimized .preview-panel-header h3,
.preview-panel.minimized .preview-resize-btn {
    display: none;
}

.preview-panel.minimized .preview-panel-header {
    justify-content: center;
    align-items: center;
    padding: 0;
}

.preview-panel.minimized .preview-minimize-btn {
    display: none;
}

.preview-panel.minimized .preview-maximize-btn {
    display: block;
    font-size: 24px;
    color: #3b82f6;
}

/* Preview Panel Loading State */
.preview-loading {
    padding: 40px 20px;
    text-align: center;
    color: #6c757d;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.preview-loading h4 {
    color: #2c3e50;
    margin-bottom: 12px;
    font-size: 18px;
    font-weight: 600;
}

.preview-loading p {
    margin-bottom: 30px;
    line-height: 1.5;
    font-size: 14px;
}

.loading-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 280px;
    margin: 0 auto;
}

.loading-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #3b82f6;
    animation: fadeInUp 0.5s ease-out;
}

.loading-step:nth-child(1) { animation-delay: 0.1s; }
.loading-step:nth-child(2) { animation-delay: 0.3s; }
.loading-step:nth-child(3) { animation-delay: 0.5s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.step-text {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

/* Floating Preview Icon */
.floating-preview-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    cursor: pointer;
    z-index: 10000;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-preview-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6);
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

.floating-preview-icon .floating-icon-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.floating-preview-icon .floating-icon-text {
    font-size: 24px;
    color: white;
}

.floating-preview-icon .floating-icon-tooltip {
    position: absolute;
    bottom: 70px;
    right: 0;
    background: #374151;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.floating-preview-icon .floating-icon-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 10px;
    border: 5px solid transparent;
    border-top-color: #374151;
}

.floating-preview-icon:hover .floating-icon-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Hide floating icon when preview panel is visible */
.product-strategy-content .preview-panel:not(.hidden) ~ .floating-preview-icon,
.product-strategy-content .preview-panel:not(.hidden) + .floating-preview-icon {
    display: none;
}

/* Simplified Preview Content */
.strategy-preview-content {
    padding: 0;
}

.strategy-preview-content .preview-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.strategy-preview-content .preview-header p {
    margin: 0;
    color: #6b7280;
    font-size: 0.9rem;
}

.strategy-preview-content .changes-container {
    margin-bottom: 1.5rem;
}

.strategy-preview-content .section-changes {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.strategy-preview-content .section-title {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
}

.strategy-preview-content .field-changes {
    margin-bottom: 1rem;
}

.strategy-preview-content .field-title {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: #6b7280;
}

.strategy-preview-content .changes-list {
    margin: 0;
    padding: 0;
    list-style: none !important;
    padding-inline-start: 0px !important;
}

.strategy-preview-content .change-item {
    margin-bottom: 1rem;
    /* padding: 0.75rem; */
    background: white;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.strategy-preview-content .change-current,
.strategy-preview-content .change-content {
    margin-bottom: 0.5rem;
}

.strategy-preview-content .change-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.strategy-preview-content .change-current-value,
.strategy-preview-content .change-value {
    font-size: 0.9rem;
    color: #374151;
    line-height: 1.4;
}

.strategy-preview-content .reasoning-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f0f9ff;
    border-radius: 8px;
    border: 1px solid #bae6fd;
}

.strategy-preview-content .reasoning-section h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #0369a1;
}

.strategy-preview-content .reasoning-content {
    font-size: 0.85rem;
    color: #0c4a6e;
    line-height: 1.4;
}

.strategy-preview-content .preview-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.strategy-preview-content .preview-btn {
    flex: 1;
    min-width: 140px;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.strategy-preview-content .keep-current-btn {
    background: #f3f4f6;
    color: #374151;
}

.strategy-preview-content .keep-current-btn:hover {
    background: #e5e7eb;
}

.strategy-preview-content .update-section-btn {
    background: #3b82f6;
    color: white;
}

.strategy-preview-content .update-section-btn:hover {
    background: #2563eb;
}

.strategy-preview-content .btn-icon {
    font-size: 1rem;
}

/* Loading States for Timeline Regeneration */
.btn-icon.spinning {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.roadmap-loading-state {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    margin: 20px 0;
}

.loading-indicator {
    text-align: center;
    color: #6b7280;
}

.loading-indicator .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

.loading-indicator p {
    font-weight: 500;
    font-size: 16px;
    margin: 0;
}

.timeline-help {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 8px 12px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 6px;
    font-size: 12px;
    color: #0369a1;
}

.help-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.help-text {
    line-height: 1.4;
    font-weight: 500;
}

/* Timeline Diagram Styles */
.timeline-diagram-container {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.timeline-diagram-container .diagram-header {
    margin-bottom: 1rem;
}

.timeline-diagram-container .diagram-header h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.timeline-diagram-container .diagram-header p {
    margin: 0;
    font-size: 0.9rem;
    color: #6b7280;
}

.timeline-diagram-container .mermaid-diagram {
    position: relative;
    min-height: 200px;
    background: #f9fafb;
    border-radius: 8px;
    padding: 0rem;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.2s ease;
}

.timeline-diagram-container .mermaid-diagram:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-1px);
}

.timeline-diagram-container .mermaid-diagram::after {
    content: "🔍 Click to view full size";
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(59, 130, 246, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.timeline-diagram-container .mermaid-diagram:hover::after {
    opacity: 1;
}

.timeline-diagram-container .diagram-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: #6b7280;
}

.timeline-diagram-container .diagram-loading .spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 0.5rem;
}

.timeline-diagram-container .diagram-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: #dc2626;
    text-align: center;
    padding: 1rem;
}

.timeline-diagram-container .diagram-error p {
    margin: 0 0 0.5rem 0;
    font-weight: 500;
}

.timeline-diagram-container .diagram-error small {
    color: #6b7280;
    font-size: 0.85rem;
}

/* Responsive timeline diagram */
@media (max-width: 768px) {
    .timeline-diagram-container {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .timeline-diagram-container .diagram-header h4 {
        font-size: 1rem;
    }
    
    .timeline-diagram-container .mermaid-diagram {
        min-height: 150px;
        padding: 0.75rem;
    }
}

#actions-litethink-value {
    display:none;
}

/* Theme Selector Styles */
.theme-selector-container {
    display: flex;
    align-items: center;
    justify-content: end;
    gap: 12px;
    /* margin: 20px 0; */
    /* padding-right: 20px; */
    padding: 15px;
    padding-right: 40px;
    padding-bottom: 0rem;
    /* background: #f8fafc; */
    /* border-radius: 8px; */
    /* border: 1px solid #e5e7eb; */
}

.theme-selector-container label {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
    margin: 0;
    white-space: nowrap;
}

.theme-selector {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    min-width: 120px;
    font-weight: 500;
}

.theme-selector:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.regenerate-theme-btn {
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.2);
    position: relative;
    overflow: hidden;
}

.regenerate-theme-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.regenerate-theme-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
}

.regenerate-theme-btn:hover::before {
    left: 100%;
}

.regenerate-theme-btn:active {
    transform: translateY(0);
}

.regenerate-theme-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.regenerate-theme-btn .btn-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Refining Button Animation */
.refine-strategy-btn.refining {
    position: relative;
    overflow: hidden;
}

.refine-strategy-btn.refining::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: refiningShimmer 1.5s infinite;
}

@keyframes refiningShimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.refine-strategy-btn.refining {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: not-allowed;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.2);
    opacity: 0.8;
}

.refine-strategy-btn.refining:hover {
    transform: none;
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.2);
}





/* Preview Panel Refine Button Animation */
.refine-btn.refining,
.refine-ai-btn.refining {
    position: relative;
    overflow: hidden;
}

.refine-btn.refining::before,
.refine-ai-btn.refining::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: refiningShimmer 1.5s infinite;
}

.refine-btn.refining,
.refine-ai-btn.refining {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: not-allowed;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.2);
    opacity: 0.8;
}

.refine-btn.refining:hover,
.refine-ai-btn.refining:hover {
    transform: none;
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.2);
}