/* Wizard V2 (TMRW-175) — single-page skeleton.
   Loaded directly via <link> in CreateTrackerV2.cshtml (with asp-append-version)
   so it bypasses the WebOptimizer bundle and updates land on every CSS change. */

.wv2-container {
    background: #f4f6f9;
    color: #2d3748;
    min-height: calc(100vh - 80px);
    padding: 1.25rem;
}

.wv2-phone-notice {
    display: none;
    background: #fffbea;
    border: 1px solid #f6e05e;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: #744210;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.wv2-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 1.5rem;
    /* Default `stretch` alignment so the left grid cell extends the full layout
       height — required for the sticky nav inside it to ride the entire scroll. */
}

/* Fills the grid cell vertically so the nested sticky nav has room to stay pinned. */
.wv2-nav-rail { height: 100%; }

/* Nav position is set dynamically by wizard-v2.js (anchored to the wv2-nav-rail
   bounding box so it clears the top navbar and left sidebar automatically).
   Falls back to static if JS fails. */
.wv2-nav {
    width: 220px;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.75rem 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.wv2-nav ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wv2-nav-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.75rem;
    font-size: 0.88rem;
    color: #4a5568;
    border-radius: 6px;
    cursor: pointer;
    user-select: none;
}

.wv2-nav-item:hover {
    background: #edf2f7;
}

.wv2-nav-item.active {
    background: #ebf8ff;
    color: #3b82f6;
    font-weight: 700;
}

.wv2-nav-item.complete {
    color: #2d3748;
    font-weight: 600;
}

.wv2-nav-status {
    font-size: 1rem;
    line-height: 1;
    width: 1rem;
    text-align: center;
    color: #a0aec0;
}

.wv2-nav-item.complete .wv2-nav-status { color: #10b981; font-weight: 700; }
.wv2-nav-item.active .wv2-nav-status { color: #3b82f6; }

.wv2-save-state {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #edf2f7;
    font-size: 0.72rem;
    color: #718096;
    text-align: center;
}

.wv2-save-state.is-saving { color: #d69e2e; }
.wv2-save-state.is-error { color: #c53030; }

/* Right content */
.wv2-content {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.wv2-section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    scroll-margin-top: 1rem;
}

.wv2-section.is-collapsed .wv2-section-body,
.wv2-section.is-collapsed .wv2-microcopy,
.wv2-section.is-collapsed .wv2-aria-live {
    display: none;
}

.wv2-section.is-collapsed .wv2-section-summary {
    display: block;
}

.wv2-section-summary { display: none; color: #718096; font-size: 0.9rem; margin-top: 0.5rem; }

.wv2-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f0f0f5;
    padding-bottom: 0.6rem;
    margin-bottom: 0.85rem;
}

.wv2-section-header h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: #2d3748;
}

.wv2-section-controls {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.wv2-microcopy-reopen,
.wv2-section-collapse,
.wv2-section-totop {
    background: transparent;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 0.15rem 0.5rem;
    color: #4a5568;
    font-size: 0.8rem;
    cursor: pointer;
}

.wv2-microcopy-reopen:hover,
.wv2-section-collapse:hover,
.wv2-section-totop:hover { background: #edf2f7; color: #3b82f6; border-color: #bfdbfe; }

.wv2-section-totop {
    /* Subtle "back to nav" affordance — works on every viewport, replaces missing
       sticky nav when layout stacks below 992px. */
    color: #718096;
}

.wv2-microcopy {
    background: #f7fafc;
    border-left: 3px solid #3b82f6;
    border-radius: 4px;
    padding: 0.75rem 0.9rem;
    margin-bottom: 0.85rem;
    color: #4a5568;
    font-size: 0.88rem;
}

.wv2-microcopy p { margin: 0 0 0.5rem 0; }

.wv2-microcopy-dismiss {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 0.2rem 0.65rem;
    color: #3b82f6;
    font-weight: 600;
    font-size: 0.78rem;
    cursor: pointer;
}

.wv2-microcopy-dismiss:hover { background: #ebf8ff; border-color: #bfdbfe; }

.wv2-aria-live {
    /* Visible status row (also announced by AT). */
    min-height: 1.2rem;
    font-size: 0.78rem;
    color: #718096;
    margin-top: 0.5rem;
}

.wv2-section-body { color: #2d3748; }

/* Responsive */
@media (max-width: 992px) {
    .wv2-layout { grid-template-columns: 1fr; }
    .wv2-nav {
        position: static;
        width: auto;
        max-height: none;
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .wv2-phone-notice { display: block; }
    .wv2-layout { display: none; }
}

/* PR13 + PR18 AI compare row — keeps Original and AI Quill editors at
   the same visual size while AI streams from empty. Quill injects
   .ql-container / .ql-editor / .quill-editor-wrapper at runtime, so
   these rules live in the host's global stylesheet rather than a
   component-scoped *.razor.css (Blazor's scope attribute never reaches
   JS-mounted children). */
.resume-compare-editor {
    min-height: 240px;
}
.resume-compare-editor .ql-container,
.resume-compare-editor .quill-editor-wrapper {
    min-height: 200px;
}
.resume-compare-editor .ql-editor {
    min-height: 200px;
}

/* Cover Letter Writer / Editor — body editor needs enough vertical
   room to show a full letter without scrolling inside Quill.
   ~22 lines at 1.4 line-height fits a typical cover letter visually.
   Sits in this global stylesheet because Quill mounts .ql-container /
   .ql-editor at runtime; Blazor scoped CSS attributes don't reach
   JS-mounted children. */
.cover-letter-body-editor {
    min-height: 520px;
}
.cover-letter-body-editor .ql-container,
.cover-letter-body-editor .quill-editor-wrapper {
    min-height: 480px;
}
.cover-letter-body-editor .ql-editor {
    min-height: 480px;
}
