/* Result cards for both calculators, the chart button, and the empty state */

.results-container {
    padding: 10px 30px 24px;
    flex-shrink: 0;
}

.results-card {
    background: rgba(15, 23, 42, 0.6);
    border-radius: 18px;
    padding: 25px 40px;
    border: none;
    backdrop-filter: blur(5px);
}

.results-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(100, 116, 139, 0.1);
}

.result-row:last-of-type {
    border-bottom: none;
}

.result-label {
    color: #cbd5e1;
    font-weight: 500;
}

.result-value {
    color: #60a5fa;
    font-weight: 700;
    font-size: 1.1rem;
}

.result-value.green {
    color: #34d399;
}

.total-cost-card {
    background: rgba(15, 23, 42, 0.8);
    border-radius: 16px;
    padding: 20px;
    margin-top: 20px;
    border: 2px solid #ef4444;
    position: relative;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.2);
}

.total-cost-content {
    text-align: center;
    position: relative;
}

.total-cost-label {
    color: #f1f5f9;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.total-cost-amount {
    color: #ef4444;
    font-size: 2.2rem;
    font-weight: 900;
    text-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

.chart-button {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    margin: 15px auto 0;
}

.chart-button:hover {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.end-balance-card {
    background: rgba(15, 23, 42, 0.8);
    border-radius: 16px;
    padding: 20px;
    margin-top: 20px;
    border: 2px solid #34d399;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 25px rgba(52, 211, 153, 0.2);
    text-align: center;
}

.end-balance-label {
    color: #f1f5f9;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.end-balance-amount {
    color: #34d399;
    font-size: 2.2rem;
    font-weight: 900;
    text-shadow: 0 2px 4px rgba(52, 211, 153, 0.3);
}

.empty-state {
    padding: 10px 40px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
}

.empty-state-card {
    background: rgba(15, 23, 42, 0.6);
    border-radius: 18px;
    padding: 25px 20px;
    border: none;
    text-align: center;
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.empty-state-icon {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 15px;
    opacity: 0.5;
    color: #94a3b8;
    position: relative;
    bottom: 0px;
}

.empty-state-icon svg {
    width: 2rem;
    height: 2rem;
}

.icon-dollar {
    animation: float 3s ease-in-out infinite;
}

.empty-state-icon .icon-clock {
    width: 1.7rem !important;
    height: 1.7rem !important;
    animation: float-higher 3s ease-in-out infinite;
}

.empty-state-text {
    color: #cbd5e1;
    font-weight: 500;
    font-size: 1.1rem;
    opacity: 0.6;
}

@media (min-width: 601px) {
    :root {
        --desktop-results-panel-height: 368px;
    }

    .empty-state {
        padding: 0;
    }

    .empty-state-card {
        padding: 18px 20px;
    }

    .empty-state-icon {
        margin-bottom: 10px;
    }

    .app-footer {
        padding: 10px 12px 16px;
    }

    #tab-spend-check.active,
    #tab-compound.active,
    .tab-content.desktop-scale-probe {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(268px, 0.88fr);
        gap: 18px;
        align-items: start;
        padding: 24px 26px 16px;
        min-height: var(--desktop-tab-body-min-height, auto);
    }

    .tab-content.active .form-container,
    .tab-content.active .results-container,
    .tab-content.active .empty-state,
    .tab-content.desktop-scale-probe .form-container,
    .tab-content.desktop-scale-probe .results-container,
    .tab-content.desktop-scale-probe .empty-state {
        padding: 0;
    }

    .tab-content.active .form-container,
    .tab-content.desktop-scale-probe .form-container {
        gap: 10px;
    }

    .tab-content.active .input-group,
    .tab-content.desktop-scale-probe .input-group {
        gap: 4px;
    }

    .tab-content.active .input-label,
    .tab-content.desktop-scale-probe .input-label {
        margin-bottom: 3px;
        font-size: 1rem;
    }

    #tab-spend-check.active .input-label {
        font-size: 1.06rem;
    }

    .tab-content.active .input-field,
    .tab-content.active .select-field,
    .tab-content.active .frequency-select-button,
    .tab-content.desktop-scale-probe .input-field,
    .tab-content.desktop-scale-probe .select-field,
    .tab-content.desktop-scale-probe .frequency-select-button {
        padding-top: 16px;
        padding-bottom: 16px;
        font-size: 0.95rem;
    }

    #tab-spend-check.active .input-field,
    #tab-spend-check.active .select-field,
    #tab-spend-check.active .frequency-select-button {
        font-size: 1rem;
    }

    .tab-content.active .empty-state-text,
    .tab-content.desktop-scale-probe .empty-state-text {
        font-size: 1.15rem;
    }

    #tab-spend-check.active .empty-state-text {
        font-size: 1.2rem;
    }

    .tab-content.active .result-label,
    .tab-content.desktop-scale-probe .result-label {
        font-size: 0.95rem;
    }

    .tab-content.active .result-value,
    .tab-content.desktop-scale-probe .result-value {
        font-size: 1.15rem;
    }

    .tab-content.active .empty-state,
    .tab-content.active .results-container,
    .tab-content.desktop-scale-probe .empty-state,
    .tab-content.desktop-scale-probe .results-container {
        margin-top: var(--desktop-input-label-offset);
    }

    .tab-content.active .empty-state,
    .tab-content.active .results-container,
    .tab-content.desktop-scale-probe .empty-state,
    .tab-content.desktop-scale-probe .results-container {
        flex-grow: 0;
        align-self: start;
    }

    .tab-content.active .empty-state,
    .tab-content.desktop-scale-probe .empty-state {
        align-items: stretch;
        justify-content: stretch;
    }

    #tab-spend-check.active .empty-state-card,
    #tab-compound.active .empty-state-card,
    #tab-spend-check.active .results-card,
    #tab-compound.active .results-card,
    .tab-content.desktop-scale-probe .empty-state-card,
    .tab-content.desktop-scale-probe:has(.results-container:not(.hidden)) .results-card {
        box-sizing: border-box;
        width: 100%;
        height: var(--desktop-results-panel-height);
        min-height: var(--desktop-results-panel-height);
        max-height: var(--desktop-results-panel-height);
    }

    #tab-spend-check.active .empty-state-card,
    #tab-compound.active .empty-state-card,
    .tab-content.desktop-scale-probe .empty-state-card {
        overflow: hidden;
    }

    #tab-spend-check.active .results-card,
    #tab-compound.active .results-card,
    .tab-content.desktop-scale-probe:has(.results-container:not(.hidden)) .results-card {
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    #tab-spend-check.active .results-content,
    #tab-compound.active .results-content,
    .tab-content.desktop-scale-probe:has(.results-container:not(.hidden)) .results-content {
        display: flex;
        flex-direction: column;
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden;
    }

    #tab-spend-check.active .results-chart-slot,
    #tab-compound.active .results-chart-slot,
    .tab-content.desktop-scale-probe:has(.results-container:not(.hidden)) .results-chart-slot {
        flex: 1 1 0;
        min-height: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
    }

    #tab-spend-check.active .results-chart-slot .chart-button,
    #tab-compound.active .results-chart-slot .chart-button,
    .tab-content.desktop-scale-probe:has(.results-container:not(.hidden)) .results-chart-slot .chart-button {
        flex-shrink: 0;
        margin: 0 auto;
    }

    .tab-content.active:has(.results-container:not(.hidden)) .results-card,
    .tab-content.desktop-scale-probe:has(.results-container:not(.hidden)) .results-card {
        padding: 16px 20px;
    }

    .tab-content.active:has(.results-container:not(.hidden)) .results-content,
    .tab-content.desktop-scale-probe:has(.results-container:not(.hidden)) .results-content {
        gap: 0.55rem;
    }

    .tab-content.active:has(.results-container:not(.hidden)) .result-row,
    .tab-content.desktop-scale-probe:has(.results-container:not(.hidden)) .result-row {
        padding: 7px 0;
    }

    .tab-content.active:has(.results-container:not(.hidden)) .total-cost-card,
    .tab-content.active:has(.results-container:not(.hidden)) .end-balance-card,
    .tab-content.desktop-scale-probe:has(.results-container:not(.hidden)) .total-cost-card,
    .tab-content.desktop-scale-probe:has(.results-container:not(.hidden)) .end-balance-card {
        margin-top: 8px;
        padding: 14px;
    }

    .tab-content.active:has(.results-container:not(.hidden)) .total-cost-amount,
    .tab-content.active:has(.results-container:not(.hidden)) .end-balance-amount,
    .tab-content.desktop-scale-probe:has(.results-container:not(.hidden)) .total-cost-amount,
    .tab-content.desktop-scale-probe:has(.results-container:not(.hidden)) .end-balance-amount {
        font-size: 1.7rem;
    }

    .tab-content.active:has(.results-container:not(.hidden)) .results-chart-slot .chart-button,
    .tab-content.desktop-scale-probe:has(.results-container:not(.hidden)) .results-chart-slot .chart-button {
        padding: 9px 18px;
        font-size: 0.9rem;
    }
}
