/* =========================================
   10. DASHBOARD MODAL (Retro Alert Style)
   ========================================= */

/* The Backdrop */
.dash-modal-overlay {
    position: fixed; inset: 0; z-index: 99999;
    background: rgba(0, 0, 0, 0.75); backdrop-filter: blur(4px);
    display: none; justify-content: center; align-items: center;
    padding: 20px;
    opacity: 0; transition: opacity 0.2s ease;
}

.dash-modal-overlay.is-visible { display: flex; opacity: 1; }

/* The Card */
.dash-modal-card {
    background: #1a1e23; width: 100%; max-width: 420px;
    border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 16px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.8);
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.19, 1, 0.22, 1);

    /* 🟢 THE FIX: Force flex column and restrict height */
    display: flex;
    flex-direction: column;
    max-height: 80dvh;
    overflow: hidden;
}

.dash-modal-overlay.is-visible .dash-modal-card {
    transform: scale(1) translateY(0);
}

/* Header */
.dash-modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 20px; background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.dash-modal-header h3 { margin: 0; font-size: 15px; font-weight: 700; color: #fff; letter-spacing: 0.5px; }

/* Body */
.dash-modal-body {
    padding: 24px 20px;
    text-align: center;
    /* 🟢 THE FIX: Allow scrolling inside the body */
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}

.dash-text { font-size: 14px; color: #ccc; line-height: 1.5; margin: 0 0 15px 0; }
.dash-subtext { font-size: 12px; color: #777; margin-top: 20px; }

/* The Pill Replica Box */
.dash-example-box {
    background: rgba(0, 0, 0, 0.3); padding: 15px;
    border-radius: 12px; border: 1px dashed rgba(255, 255, 255, 0.15);
    margin: 20px 0; display: flex; justify-content: center;
}

/* Feedback Row */
.dash-feedback-row {
    display: flex; justify-content: center; gap: 20px; font-size: 24px; margin-top: 15px;
}
.dash-feedback-row a {
    text-decoration: none; transition: transform 0.2s; cursor: pointer; opacity: 0.7;
}
.dash-feedback-row a:hover { transform: scale(1.2); opacity: 1; }

/* Footer */
.dash-modal-footer {
    padding: 16px 20px; background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex; justify-content: space-between; align-items: center;
}

/* Controls */
.dash-close-btn { background: none; border: none; color: #666; font-size: 20px; cursor: pointer; padding: 0; line-height: 1; }
.dash-close-btn:hover { color: #fff; }

.dash-primary-btn {
    background: #fff; color: #000; border: none; padding: 8px 20px;
    border-radius: 6px; font-weight: 700; font-size: 13px; cursor: pointer;
}
.dash-primary-btn:hover { background: #e0e0e0; }

.dash-checkbox { font-size: 12px; color: #888; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.dash-checkbox input { accent-color: var(--accent); }


/* =========================================
   ADVANCED HELP MODAL (The Manual)
   ========================================= */

/* A container to hold "fake" UI elements (Timeline, Buttons) */
.modal-ui-preview {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 15px;
    margin: 10px 0 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* Keep the glow inside */
}

/* --- Section Headers --- */
.guide-section-title {
    font-size: 11px;
    color: var(--accent); /* Cyan */
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 25px;
    margin-bottom: 8px;
    display: block;
}
.guide-section-title:first-child { margin-top: 0; }

/* --- Label Tags (Cyan/Gold/Purple) --- */
.label-tag {
    display: inline-block;
    font-weight: 800;
    font-size: 9px;
    color: #000;
    background: #ccc;
    padding: 2px 6px;
    border-radius: 4px;
    min-width: 45px;
    text-align: center;
    margin-right: 10px;
    vertical-align: middle;
}

.label-tag.real { background: #3dd1dc; box-shadow: 0 0 8px rgba(61, 209, 220, 0.4); }
.label-tag.sim  { background: #f39c12; box-shadow: 0 0 8px rgba(243, 156, 18, 0.4); }
.label-tag.fork { background: #9b59b6; color: #fff; box-shadow: 0 0 8px rgba(155, 89, 182, 0.4); }

/* --- Help Rows --- */
.help-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}
.help-row p { margin: 0; font-size: 13px; color: #ccc; line-height: 1.3; }
.help-row strong { color: #fff; }

/* --- Button Grid for Navigation --- */
.help-controls-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    row-gap: 12px;
    align-items: center;
}

/* Force the fake buttons to look static in the modal */
.help-controls-grid .t-ctrl-btn {
    cursor: default;
    transform: scale(0.9); /* Slightly smaller to fit */
}
.help-controls-grid .t-ctrl-btn:hover {
    background: rgba(255, 255, 255, 0.05); /* Disable hover glow */
}

/* --- Fake Timeline Track --- */
.modal-timeline-container {
    width: 100%;
    height: 30px;
    position: relative;
    display: flex;
    align-items: center;
}