﻿/* dashboard.css — EW2027 member Dashboard page shell.
   Two-column layout (watch-list cards left, calendar + chart right), mirroring
   the EW2023 col-xl-4 / col-xl-8 split but with CSS grid and EW2027 tokens. */

.dash-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 8px 16px 60px;
}

.dash-head h1 {
    margin: 0 0 4px;
}

.dash-titlerow {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.dash-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    color: var(--ew-gold, #DDB785); /* matches the lightning & bear title icons */
}

/* account-settings + download buttons, pushed to the right of the title */
.dash-actions {
    margin-left: auto;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.dash-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    border: 1px solid var(--border, #d6dce6);
    border-radius: 8px;
    background: var(--surface, #fff);
    color: var(--text, #323232);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

    .dash-btn svg {
        flex: 0 0 auto;
        color: var(--text-muted, #5b6472);
        transition: color 0.15s ease;
    }

    .dash-btn:hover {
        border-color: var(--ew-gold, #ddb785);
        color: var(--ew-gold, #ddb785);
    }

        .dash-btn:hover svg {
            color: var(--ew-gold, #ddb785);
        }

/* on narrow screens, let the buttons wrap under the title full-width */
@media (max-width: 560px) {
    .dash-actions {
        margin-left: 0;
        width: 100%;
    }

    .dash-btn {
        flex: 1 1 auto;
        justify-content: center;
    }
}

.dash-sub {
    color: var(--text-muted, #5b6472);
    margin: 0 0 20px;
    font-size: 0.92rem;
}

.dash-loading {
    padding: 40px 0;
    text-align: center;
    color: var(--text-muted, #5b6472);
}

/* stacked full-width sections: calendar on top, then chart, then cards */
.dash-cal {
    width: 100%;
}

.dash-chart {
    width: 100%;
    margin-top: 24px;
}

/* cards container is a plain full-width block — the inner .wlc-grid (from
   wl-cards.css) lays out the columns. */
.dash-cards {
    width: 100%;
    margin-top: 28px;
}

    .dash-cards .dash-loading {
        text-align: center;
    }

/* previews section sits between the chart and the cards */
.dash-previews {
    width: 100%;
    margin-top: 28px;
}

/* ---- Dialogs (download chooser, remove confirmation) ----
   Native <dialog>, so Esc, focus trapping and the backdrop come for free. */
.dash-dialog {
    width: min(440px, calc(100vw - 32px));
    padding: 22px 24px 18px;
    border: 1px solid var(--border, #d6dce6);
    border-radius: 14px;
    background: var(--surface, #fff);
    color: var(--text, #323232);
    box-shadow: 0 18px 50px -18px rgba(0, 0, 0, 0.55);
}

    .dash-dialog::backdrop {
        background: rgba(0, 0, 0, 0.45);
    }

.dash-dialog-title {
    margin: 0 0 6px;
    font-size: 1.1rem;
    font-weight: 800;
}

.dash-dialog-body {
    margin: 0 0 16px;
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--text-muted, #5b6472);
}

/* Standard / Expanded selector */
.dash-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 14px;
}

    .dash-detail button {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
        padding: 9px 11px;
        border: 1px solid var(--border, #d6dce6);
        border-radius: 9px;
        background: transparent;
        color: inherit;
        font: inherit;
        text-align: left;
        cursor: pointer;
    }

        .dash-detail button[aria-checked="true"] {
            border-color: var(--ew-gold, #ddb785);
            background: color-mix(in srgb, var(--ew-gold, #ddb785) 14%, transparent);
        }

        /* locked, not hidden: a member should be able to see what a subscription adds */
        .dash-detail button.is-locked {
            opacity: .55;
            cursor: not-allowed;
        }

.dash-detail-name {
    font-size: .88rem;
    font-weight: 800;
}

.dash-detail-note {
    font-size: .72rem;
    color: var(--text-muted, #5b6472);
}

.dash-dialog-choices {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.dash-choice {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 12px 14px;
    border: 1px solid var(--border, #d6dce6);
    border-radius: 10px;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

    .dash-choice:hover:not(:disabled) {
        border-color: var(--ew-gold, #ddb785);
        background: color-mix(in srgb, var(--ew-gold, #ddb785) 10%, transparent);
    }

    .dash-choice:disabled {
        opacity: 0.6;
        cursor: progress;
    }

.dash-choice-name {
    font-size: 0.95rem;
    font-weight: 800;
}

.dash-choice-note {
    font-size: 0.74rem;
    color: var(--text-muted, #5b6472);
}

.dash-dialog-foot {
    margin: 14px 0 0;
    font-size: 0.78rem;
    color: var(--text-muted, #5b6472);
}

    .dash-dialog-foot a {
        color: var(--ew-gold, #ddb785);
        font-weight: 700;
    }

.dash-dialog-status {
    margin: 14px 0 0;
    font-size: 0.82rem;
    color: var(--text-muted, #5b6472);
}

    .dash-dialog-status.is-error {
        color: var(--ew-red, #e13232);
        font-weight: 600;
    }

.dash-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
}

/* destructive confirm, used on the edit page */
.dash-btn-danger {
    border-color: var(--ew-red, #e13232);
    color: var(--ew-red, #e13232);
}

    .dash-btn-danger:hover {
        background: color-mix(in srgb, var(--ew-red, #e13232) 12%, transparent);
        border-color: var(--ew-red, #e13232);
        color: var(--ew-red, #e13232);
    }

@media (max-width: 420px) {
    .dash-dialog-choices {
        grid-template-columns: 1fr;
    }
}
