/**
 * Valuation Lab - Stock Valuation Tool Styles
 * Matches mura-child theme design system
 */

/* Variables - Light theme (default) */
:root {
    /* Primary colors */
    --valu8-primary: #0C9B59;
    --valu8-primary-hover: #0a8a4f;
    --valu8-primary-light: #E2FFF2;

    /* Status colors */
    --valu8-success: #0C9B59;
    --valu8-success-bg: rgba(12, 155, 89, 0.1);
    --valu8-danger: #f43f5e;
    --valu8-danger-bg: rgba(244, 63, 94, 0.1);
    --valu8-warning: #F6C356;

    /* Light theme backgrounds */
    --valu8-bg: #f9fafb;
    --valu8-bg-card: #ffffff;
    --valu8-bg-card-hover: #f3f4f6;

    /* Light theme borders */
    --valu8-border: rgba(0, 0, 0, 0.10);
    --valu8-border-light: #e5e7eb;

    /* Dark text for light theme */
    --valu8-text: #041F13;
    --valu8-text-muted: rgba(4, 31, 19, 0.75);
    --valu8-text-dimmed: rgba(4, 31, 19, 0.50);

    --valu8-font: 'Kumbh Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Dashboard Container */
.valuation-dashboard {
    background-color: var(--valu8-bg);
    min-height: 100vh;
    padding: 0;
    flex: 1;
}

/* Ensure full height layout */
.page-template-valuation .dashboard-wrapper {
    min-height: 100vh;
}

.page-template-valuation .dashboard-right {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--valu8-bg);
}

.page-template-valuation .dashboard-content.valuation-dashboard {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.page-template-valuation .valuation-hero {
    padding-top: 40px;
    padding-bottom: 40px;
}

/* Valuation Header */
.valuation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid var(--valu8-border-light);
    background: var(--valu8-bg-card);
    position: sticky;
    top: 0;
    z-index: 30;
}

.valuation-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.valuation-brand .brand-icon {
    background: var(--valu8-primary);
    padding: 10px;
    border-radius: 10px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.valuation-brand h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--valu8-text);
    margin: 0;
    font-family: var(--valu8-font);
}

.btn-manage-models {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--valu8-bg-card);
    border: 1px solid var(--valu8-border);
    color: var(--valu8-text-muted);
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--valu8-font);
}

.btn-manage-models:hover {
    border-color: var(--valu8-primary);
    color: var(--valu8-primary);
    background: var(--valu8-bg-card-hover);
}

.btn-manage-models .model-count {
    background: var(--valu8-primary-light);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 12px;
    color: var(--valu8-primary);
}

/* Search Hero */
.valuation-hero {
    max-width: 700px;
    margin: 60px auto;
    text-align: center;
    padding: 0 20px;
}

.valuation-hero h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--valu8-text);
    margin-bottom: 16px;
    font-family: var(--valu8-font);
}

.valuation-hero h2 .highlight {
    color: var(--valu8-primary);
}

.valuation-hero p {
    color: var(--valu8-text-muted);
    font-size: 1.1rem;
    margin-bottom: 32px;
    line-height: 1.6;
}

.valuation-search-form {
    position: relative;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--valu8-bg-card);
    border: 1px solid var(--valu8-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.search-input-wrapper:focus-within {
    border-color: var(--valu8-primary);
    box-shadow: 0 0 0 3px rgba(12, 155, 89, 0.15), 0 4px 12px rgba(0, 0, 0, 0.1);
}

.search-input-wrapper .search-icon {
    position: absolute;
    left: 14px;
    color: var(--valu8-text-dimmed);
    transition: color 0.2s;
}

.search-input-wrapper:focus-within .search-icon {
    color: var(--valu8-primary);
}

.search-input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--valu8-text);
    font-size: 1rem;
    padding: 14px 16px 14px 44px;
    outline: none;
    font-family: var(--valu8-font);
}

.search-input-wrapper input::placeholder {
    color: var(--valu8-text-dimmed);
}

.search-input-wrapper button {
    background: var(--valu8-primary);
    color: white;
    border: none;
    padding: 10px 20px;
    margin: 6px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--valu8-font);
}

.search-input-wrapper button:hover:not(:disabled) {
    background: var(--valu8-primary-hover);
}

.search-input-wrapper button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Loading State */
.valuation-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--valu8-text-muted);
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--valu8-border);
    border-top-color: var(--valu8-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

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

/* Error State */
.valuation-error {
    max-width: 600px;
    margin: 0 auto 30px;
    padding: 16px 24px;
    background: var(--valu8-danger-bg);
    border: 1px solid rgba(244, 63, 94, 0.3);
    border-radius: 12px;
    color: #fda4af;
    text-align: center;
}

/* Cache Indicator */
.cache-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--valu8-primary-light);
    border: 1px solid rgba(12, 155, 89, 0.2);
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 20px;
    font-size: 0.875rem;
    color: var(--valu8-text-muted);
}

.cache-indicator svg {
    color: var(--valu8-primary);
    flex-shrink: 0;
}

.cache-indicator strong {
    color: var(--valu8-text);
}

.cache-indicator .refresh-btn {
    margin-left: auto;
    background: transparent;
    border: 1px solid var(--valu8-primary);
    color: var(--valu8-primary);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--valu8-font);
}

.cache-indicator .refresh-btn:hover {
    background: var(--valu8-primary);
    color: white;
}

/* Results Dashboard */
.valuation-results {
    padding: 0 30px 60px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Top Stats Row */
.results-top-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

@media (max-width: 1024px) {
    .results-top-row {
        grid-template-columns: 1fr;
    }
}

/* Company Info Card */
.company-info-card {
    background: var(--valu8-bg-card);
    border: 1px solid var(--valu8-border);
    border-radius: 16px;
    padding: 24px;
}

.company-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.company-header .ticker {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--valu8-text);
    margin: 0;
}

.company-header .divider {
    color: var(--valu8-text-dimmed);
}

.company-header .company-name {
    font-size: 1.125rem;
    color: var(--valu8-text-muted);
}

.current-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 16px;
}

.current-price .price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--valu8-text);
}

.current-price .currency {
    font-size: 0.875rem;
    color: var(--valu8-text-dimmed);
    text-transform: uppercase;
}

.company-info-card .summary {
    color: var(--valu8-text-muted);
    line-height: 1.7;
    margin: 0;
}

/* Chart Card */
.chart-card {
    background: var(--valu8-bg-card);
    border: 1px solid var(--valu8-border);
    border-radius: 16px;
    padding: 24px;
}

.chart-card h3 {
    color: var(--valu8-text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 20px 0;
}

.chart-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chart-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chart-bar .bar-label {
    width: 60px;
    font-size: 0.75rem;
    color: var(--valu8-text-muted);
    text-align: right;
    flex-shrink: 0;
}

.chart-bar .bar-track {
    flex: 1;
    height: 24px;
    background: var(--valu8-bg);
    border-radius: 4px;
    overflow: hidden;
}

.chart-bar .bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.chart-bar .bar-fill.market {
    background: var(--valu8-text-dimmed);
}

.chart-bar .bar-fill.undervalued {
    background: var(--valu8-success);
}

.chart-bar .bar-fill.overvalued {
    background: var(--valu8-danger);
}

.chart-bar .bar-value {
    width: 120px;
    font-size: 0.75rem;
    color: var(--valu8-text-muted);
    flex-shrink: 0;
    text-align: right;
}

.chart-bar .bar-pct {
    font-size: 0.65rem;
    margin-left: 2px;
}

.chart-bar .bar-pct.positive {
    color: #22c55e;
}

.chart-bar .bar-pct.negative {
    color: #ef4444;
}

/* Composite bar styling */
.chart-bar--composite {
    background: var(--valu8-bg);
    border-radius: 6px;
    padding: 6px 8px;
    margin: 8px -8px 0 -8px;
}

.chart-bar--composite .bar-label {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.65rem;
    letter-spacing: 0.5px;
}

/* Financial Ratios Section */
.ratios-section {
    margin-bottom: 32px;
}

.ratios-section h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--valu8-text);
    margin: 0 0 16px 0;
}

.ratios-section h3 svg {
    color: var(--valu8-primary);
}

.ratios-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}

@media (max-width: 1200px) {
    .ratios-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 640px) {
    .ratios-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.ratio-item {
    background: var(--valu8-bg-card);
    border: 1px solid var(--valu8-border);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    transition: all 0.2s ease;
}

.ratio-item:hover {
    background: var(--valu8-bg-card-hover);
}

.ratio-item .ratio-label {
    display: block;
    font-size: 0.7rem;
    color: var(--valu8-text-dimmed);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.ratio-item .ratio-value {
    display: block;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--valu8-text);
}

/* Models Section */
.models-section {
    margin-bottom: 32px;
}

.models-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.models-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--valu8-text);
    margin: 0;
}

.models-header h3 svg {
    color: var(--valu8-primary);
}

.models-header .models-count {
    color: var(--valu8-text-dimmed);
    font-size: 0.875rem;
}

.models-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 1200px) {
    .models-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .models-grid {
        grid-template-columns: 1fr;
    }
}

/* Valuation Card */
.valuation-card {
    background: var(--valu8-bg-card);
    border: 1px solid var(--valu8-border);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
    min-height: 280px;
}

.valuation-card:hover {
    border-color: var(--valu8-border-light);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.valuation-card.na-card {
    opacity: 0.7;
    min-height: auto;
}

.valuation-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.valuation-card .model-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--valu8-text);
    margin: 0 0 4px 0;
}

.valuation-card .model-info .category {
    font-size: 0.75rem;
    color: var(--valu8-text-dimmed);
}

.valuation-card .na-badge {
    font-size: 0.75rem;
    color: var(--valu8-text-dimmed);
    border: 1px solid var(--valu8-border);
    padding: 2px 8px;
    border-radius: 20px;
}

.valuation-card .na-reason {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--valu8-text-muted);
    margin: 0;
}

.valuation-card .na-reason svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.upside-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 700;
}

.upside-badge.undervalued {
    background: var(--valu8-success-bg);
    color: var(--valu8-success);
    border: 1px solid rgba(12, 155, 89, 0.3);
}

.upside-badge.overvalued {
    background: var(--valu8-danger-bg);
    color: var(--valu8-danger);
    border: 1px solid rgba(244, 63, 94, 0.3);
}

.valuation-card .fair-value {
    margin-bottom: 16px;
}

.valuation-card .fair-value .value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--valu8-text);
}

.valuation-card .fair-value .label {
    font-size: 0.875rem;
    color: var(--valu8-text-muted);
    margin-left: 8px;
}

.valuation-card .details {
    font-size: 0.875rem;
    color: var(--valu8-text-muted);
    line-height: 1.6;
    margin: 0 0 16px 0;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.valuation-card .assumptions {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--valu8-border);
}

.valuation-card .assumptions h5 {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--valu8-text-dimmed);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 8px 0;
}

.assumptions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.assumption-item {
    background: var(--valu8-bg);
    border: 1px solid var(--valu8-border);
    border-radius: 6px;
    padding: 8px;
}

.assumption-item .assumption-key {
    display: block;
    font-size: 0.65rem;
    color: var(--valu8-text-dimmed);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.assumption-item .assumption-value {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--valu8-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Add Model Card */
.add-model-card {
    border: 2px dashed var(--valu8-border);
    background: transparent;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--valu8-text-dimmed);
}

.add-model-card:hover {
    border-color: var(--valu8-primary);
    background: var(--valu8-primary-light);
    color: var(--valu8-primary);
}

.add-model-card .add-icon {
    background: var(--valu8-bg);
    padding: 16px;
    border-radius: 50%;
    margin-bottom: 12px;
    transition: background 0.2s;
}

.add-model-card:hover .add-icon {
    background: var(--valu8-bg-card);
}

.add-model-card span {
    font-weight: 600;
}

/* Sources Section */
.sources-section {
    border-top: 1px solid var(--valu8-border);
    padding-top: 24px;
}

.sources-section h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--valu8-text-dimmed);
    margin: 0 0 12px 0;
}

.sources-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.source-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--valu8-primary);
    background: var(--valu8-primary-light);
    border: 1px solid rgba(12, 155, 89, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.source-badge:hover {
    background: rgba(12, 155, 89, 0.2);
    color: var(--valu8-primary-hover);
}

/* Modal */
.valuation-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.valuation-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.valuation-modal .modal-content {
    position: relative;
    background: var(--valu8-bg-card);
    border: 1px solid var(--valu8-border);
    border-radius: 16px;
    width: 90%;
    max-width: 560px;
    max-height: 70vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.valuation-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--valu8-border);
}

.valuation-modal .modal-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--valu8-text);
    margin: 0;
}

.valuation-modal .modal-close {
    background: none;
    border: none;
    color: var(--valu8-text-dimmed);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s;
}

.valuation-modal .modal-close:hover {
    color: var(--valu8-text);
}

.valuation-modal .modal-body {
    padding: 16px 20px;
    overflow-y: auto;
    flex: 1;
}

.valuation-modal .modal-description {
    color: var(--valu8-text-muted);
    margin: 0 0 12px 0;
    font-size: 0.8125rem;
}

.valuation-modal .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--valu8-border);
    background: var(--valu8-bg);
}

/* Model List in Modal */
.models-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.model-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: var(--valu8-bg);
    border: 1px solid var(--valu8-border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.model-item:hover {
    border-color: var(--valu8-border-light);
}

.model-item.active {
    border-color: var(--valu8-primary);
    background: var(--valu8-primary-light);
}

.model-item input[type="checkbox"] {
    margin-top: 4px;
    accent-color: var(--valu8-primary);
    width: 18px;
    height: 18px;
}

.model-item .model-content {
    flex: 1;
}

.model-item .model-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.model-item .model-name {
    font-weight: 600;
    color: var(--valu8-text);
}

.model-item .model-category {
    font-size: 0.75rem;
    color: var(--valu8-text-dimmed);
    background: var(--valu8-bg-card);
    padding: 2px 8px;
    border-radius: 4px;
}

.model-item .model-description {
    font-size: 0.8125rem;
    color: var(--valu8-text-muted);
    margin: 0;
    line-height: 1.4;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--valu8-font);
}

.btn-primary {
    background: var(--valu8-primary);
    color: white;
    border: none;
}

.btn-primary:hover {
    background: var(--valu8-primary-hover);
}

.btn-secondary {
    background: transparent;
    color: var(--valu8-text-muted);
    border: 1px solid var(--valu8-border);
}

.btn-secondary:hover {
    background: var(--valu8-bg);
    border-color: var(--valu8-border-light);
    color: var(--valu8-text);
}

/* Responsive */
@media (max-width: 768px) {
    .valuation-header {
        padding: 15px 20px;
    }

    .valuation-hero {
        margin: 40px auto;
    }

    .valuation-hero h2 {
        font-size: 1.75rem;
    }

    .valuation-results {
        padding: 0 20px 40px;
    }

    .company-header {
        flex-wrap: wrap;
    }

    .current-price .price {
        font-size: 2rem;
    }
}

/* =====================================================
   Dark Mode - WP Dark Mode Plugin Support
   ===================================================== */
html.wp-dark-mode-active {
    /* Override CSS variables for dark mode */
    --valu8-bg: #0f172a;
    --valu8-bg-card: #1e293b;
    --valu8-bg-card-hover: #263445;
    --valu8-border: #334155;
    --valu8-border-light: #475569;
    --valu8-text: #f1f5f9;
    --valu8-text-muted: #94a3b8;
    --valu8-text-dimmed: #64748b;
    --valu8-primary-light: rgba(12, 155, 89, 0.15);
}

/* Dark mode - Dashboard & Header */
html.wp-dark-mode-active .valuation-dashboard,
html.wp-dark-mode-active .page-template-valuation .dashboard-right {
    background-color: var(--valu8-bg);
}

html.wp-dark-mode-active .valuation-header {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom-color: var(--valu8-border);
}

/* Dark mode - Brand */
html.wp-dark-mode-active body .valuation-brand h1 {
    /* background: linear-gradient(to right, white, #94a3b8); */
    -webkit-background-clip: text;
    -webkit-text-fill-color: white !important;
    background-clip: text;
    background-image: none !important;
    background: none !important;
}

/* Dark mode - Search */
html.wp-dark-mode-active .search-input-wrapper {
    box-shadow: 0 10px 30px rgba(12, 155, 89, 0.1);
}

html.wp-dark-mode-active .search-input-wrapper:focus-within {
    box-shadow: 0 0 0 3px rgba(12, 155, 89, 0.2), 0 20px 40px rgba(12, 155, 89, 0.15);
}

/* Dark mode - Cards */
html.wp-dark-mode-active .valuation-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

html.wp-dark-mode-active .add-model-card:hover {
    background: rgba(12, 155, 89, 0.1);
}

/* Dark mode - Modal */
html.wp-dark-mode-active .valuation-modal .modal-overlay {
    background: rgba(0, 0, 0, 0.7);
}

html.wp-dark-mode-active .valuation-modal .modal-content {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Dark mode - Chart bars */
html.wp-dark-mode-active .chart-bar .bar-track {
    background: #0f172a;
}

html.wp-dark-mode-active .chart-bar--composite {
    background: rgba(255, 255, 255, 0.05);
}

html.wp-dark-mode-active .chart-bar .bar-pct.positive {
    color: #64ffda;
}

html.wp-dark-mode-active .chart-bar .bar-pct.negative {
    color: #ff8a80;
}

/* Dark mode - Button hover states */
html.wp-dark-mode-active .btn-manage-models:hover {
    color: white;
}

html.wp-dark-mode-active .btn-secondary:hover {
    color: white;
}

html.wp-dark-mode-active .valuation-modal .modal-close:hover {
    color: white;
}

/* =====================================================
   Demo Mode - Public User Experience
   ===================================================== */

/* Demo Banner */
.demo-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(12, 155, 89, 0.1) 0%, rgba(12, 155, 89, 0.05) 100%);
    border: 1px solid rgba(12, 155, 89, 0.2);
    border-radius: 8px;
    padding: 12px 20px;
    margin-bottom: 24px;
    font-size: 0.875rem;
    color: var(--valu8-text-muted);
}

.demo-banner svg {
    color: var(--valu8-primary);
    flex-shrink: 0;
}

.demo-banner a {
    color: var(--valu8-primary);
    font-weight: 600;
    text-decoration: none;
}

.demo-banner a:hover {
    text-decoration: underline;
}

/* Demo Stock Grid */
.demo-stock-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin-top: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Demo Stock Cards */
.demo-stock-card {
    background: var(--valu8-bg-card);
    border: 2px solid var(--valu8-border);
    border-radius: 12px;
    padding: 1.25rem 1rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--valu8-text);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    letter-spacing: 0.5px;
}

.demo-stock-card:hover {
    border-color: var(--valu8-primary);
    background: var(--valu8-primary-light);
    color: var(--valu8-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(12, 155, 89, 0.15);
}

.demo-stock-card.active {
    border-color: var(--valu8-primary);
    background: var(--valu8-primary);
    color: white;
    box-shadow: 0 4px 16px rgba(12, 155, 89, 0.3);
}

/* Demo CTA */
.demo-cta {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.9rem;
    color: var(--valu8-text-muted);
}

.demo-cta a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--valu8-primary);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.demo-cta a:hover {
    gap: 10px;
}

.demo-cta svg {
    transition: transform 0.2s;
}

.demo-cta a:hover svg {
    transform: translateX(4px);
}

/* Dark Mode - Demo Elements */
html.wp-dark-mode-active .demo-banner {
    background: linear-gradient(135deg, rgba(12, 155, 89, 0.15) 0%, rgba(12, 155, 89, 0.05) 100%);
    border-color: rgba(12, 155, 89, 0.3);
}

html.wp-dark-mode-active .demo-stock-card {
    background: var(--valu8-bg-card);
    border-color: var(--valu8-border);
}

html.wp-dark-mode-active .demo-stock-card:hover {
    background: rgba(12, 155, 89, 0.1);
}

html.wp-dark-mode-active .demo-stock-card.active {
    background: var(--valu8-primary);
    color: white;
}

/* Responsive - Demo Grid */
@media (max-width: 600px) {
    .demo-stock-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
        max-width: 100%;
    }

    .demo-stock-card {
        padding: 1rem 0.75rem;
        font-size: 1rem;
        min-width: unset;
    }
}

@media (max-width: 400px) {
    .demo-stock-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
