/* ==========================================================================
   MANUALS QUIZ WIZARD - 2026 CLEAN LIGHT DESIGN SYSTEM
   ========================================================================== */

:root {
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-subtle: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --primary-border: #bfdbfe;
    --success: #16a34a;
    --success-light: #f0fdf4;
    --success-border: #bbf7d0;
    --danger: #dc2626;
    --danger-light: #fef2f2;
    --danger-border: #fecaca;
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 20px -2px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 12px 32px -4px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body.manual-page {
    background-color: var(--bg-page);
    color: var(--text-primary);
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 18px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

/* Base Container */
.manual-wrapper {
    max-width: 980px;
    margin: 0 auto;
    padding: 24px 20px 80px;
}

/* Header */
.manual-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0 24px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.manual-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.04em;
}

.logo-badge {
    background: var(--text-primary);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    letter-spacing: 0.08em;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.manual-back-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
}

.manual-back-link:hover {
    color: var(--primary);
    background: var(--bg-card-subtle);
}

.btn-header-hostland {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #16a34a;
    color: #ffffff !important;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    transition: background 0.2s, transform 0.1s;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.25);
}

.btn-header-hostland:hover {
    background: #15803d;
    transform: translateY(-1px);
}

/* Partner CTA Big Button Box in Step 1 */
.partner-cta-card {
    background: #f0fdf4;
    border: 2px solid #86efac;
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin: 18px 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.1);
    flex-wrap: wrap;
}

.partner-cta-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.partner-cta-text strong {
    font-size: 17px;
    color: #14532d;
    font-weight: 800;
}

.partner-cta-text span {
    font-size: 14px;
    color: #166534;
}

.btn-partner-big {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #16a34a;
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 17px;
    font-weight: 800;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-partner-big:hover {
    background: #15803d;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(22, 163, 74, 0.45);
}

.btn-partner-big:active {
    transform: translateY(0);
}

/* Navigation Tabs Between Guides */
.manual-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 32px;
}

.manual-tab-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.manual-tab-item:hover {
    border-color: var(--border-hover);
    background: #ffffff;
}

.manual-tab-item.active {
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.08);
}

.tab-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.tab-info h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.manual-tab-item.active .tab-info h3 {
    color: var(--primary);
}

.tab-info p {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

/* Page Intro */
.page-title-box {
    margin-bottom: 28px;
    text-align: center;
}

.page-title {
    font-size: clamp(24px, 4vw, 32px);
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.page-subtitle {
    font-size: 16px;
    color: var(--text-muted);
}

/* QUIZ STEPPER WIZARD CONTAINER */
.quiz-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    position: relative;
}

/* Stepper Progress Header */
.quiz-header-bar {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 20px 28px;
}

.quiz-progress-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.quiz-step-count {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--primary-light);
    border: 1px solid var(--primary-border);
    padding: 4px 12px;
    border-radius: 9999px;
}

.quiz-progress-percent {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
}

.quiz-progress-track {
    width: 100%;
    height: 8px;
    background: var(--bg-card-subtle);
    border-radius: 9999px;
    overflow: hidden;
    position: relative;
}

.quiz-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    width: 16.66%;
    border-radius: 9999px;
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Visual Stepper Bubbles */
.stepper-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed var(--border-color);
    overflow-x: auto;
    gap: 8px;
}

.stepper-nav::-webkit-scrollbar {
    height: 4px;
}

.step-node {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: not-allowed;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    transition: all 0.2s;
}

.step-node.active {
    color: var(--primary);
    font-weight: 700;
    cursor: default;
}

.step-node.completed {
    color: var(--success);
    cursor: pointer;
}

.step-node.completed:hover {
    background: var(--success-light);
}

.step-bubble {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    background: var(--bg-card-subtle);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.step-node.active .step-bubble {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.step-node.completed .step-bubble {
    background: var(--success);
    color: #ffffff;
    border-color: var(--success);
}

/* Step Content Sections */
.quiz-step-pane {
    display: none;
    padding: 32px 32px 40px;
    animation: fadeInStep 0.3s ease-out;
}

.quiz-step-pane.active {
    display: block;
}

@keyframes fadeInStep {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-heading-group {
    margin-bottom: 24px;
}

.step-number-tag {
    display: inline-block;
    font-size: 13px;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}

.step-pane-title {
    font-size: clamp(22px, 3vw, 26px);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.3;
}

/* Action Items List */
.step-actions-list {
    list-style: none;
    margin: 20px 0 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.step-actions-list li {
    position: relative;
    padding-left: 28px;
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.55;
}

.step-actions-list li::before {
    content: "•";
    position: absolute;
    left: 8px;
    top: 0;
    color: var(--primary);
    font-size: 24px;
    line-height: 1.2;
}

.step-actions-list a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.key-tag {
    display: inline-block;
    background: #e0f2fe;
    color: #0369a1;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.95em;
    border: 1px solid #bae6fd;
}

/* Screenshot Display */
.step-screenshot-wrapper {
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #f8fafc;
    margin: 24px 0;
    cursor: zoom-in;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.step-screenshot-wrapper:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.step-screenshot-wrapper img {
    display: block;
    width: 100%;
    height: auto;
}

.screenshot-zoom-hint {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(15, 23, 42, 0.75);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 9999px;
    backdrop-filter: blur(4px);
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Callout Info Boxes */
.callout {
    border-radius: var(--radius-md);
    padding: 18px 20px;
    margin: 20px 0;
    font-size: 16px;
    line-height: 1.55;
}

.callout-title {
    font-weight: 800;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.callout-green {
    background: var(--success-light);
    border: 1px solid var(--success-border);
    color: #166534;
}

.callout-green .callout-title {
    color: #14532d;
}

.callout-blue {
    background: var(--primary-light);
    border: 1px solid var(--primary-border);
    color: #1e40af;
}

.callout-blue .callout-title {
    color: #1e3a8a;
}

.callout-red {
    background: #fef2f2;
    border: 2px solid #ef4444;
    color: #991b1b;
    padding: 22px 24px;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.12);
}

.callout-red .callout-title {
    color: #b91c1c;
    font-size: 17px;
    font-weight: 900;
    margin-bottom: 12px;
}

/* Credentials Table for Final Step */
.creds-box {
    margin: 24px 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #ffffff;
}

.creds-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    text-align: left;
}

.creds-table th {
    background: var(--bg-card-subtle);
    padding: 12px 16px;
    font-weight: 700;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.creds-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    vertical-align: middle;
}

.creds-table tr:last-child td {
    border-bottom: none;
}

.code-pill {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
}

.btn-copy {
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-copy:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.btn-copy.copied {
    background: var(--success);
    color: #ffffff;
    border-color: var(--success);
}

/* Quiz Controls Bar */
.quiz-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    gap: 16px;
    flex-wrap: wrap;
}

.btn-quiz-prev {
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    padding: 12px 22px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-quiz-prev:hover {
    background: var(--bg-card-subtle);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.btn-quiz-next {
    background: var(--primary);
    border: 1px solid var(--primary);
    color: #ffffff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
    margin-left: auto;
}

.btn-quiz-next:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
}

.btn-quiz-next:active {
    transform: translateY(0);
}

.btn-restart {
    background: var(--bg-card-subtle);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-restart:hover {
    background: #e2e8f0;
    color: var(--text-primary);
}

/* Lightbox Modal */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: 24px;
    cursor: zoom-out;
}

.lightbox-modal.open {
    display: flex;
}

.lightbox-content {
    max-width: 95vw;
    max-height: 92vh;
    border-radius: var(--radius-md);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 28px;
    color: #ffffff;
    font-size: 36px;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .manual-wrapper {
        padding: 16px 14px 60px;
    }
    .manual-tabs {
        grid-template-columns: 1fr;
    }
    .quiz-header-bar {
        padding: 16px;
    }
    .quiz-step-pane {
        padding: 20px 16px 28px;
    }
    .step-node span:not(.step-bubble) {
        display: none;
    }
    .creds-table {
        display: block;
        overflow-x: auto;
    }
    .quiz-controls {
        flex-direction: column-reverse;
        align-items: stretch;
    }
    .btn-quiz-next, .btn-quiz-prev {
        width: 100%;
        justify-content: center;
    }
}
