/* css_quiz.css — Feasibility Microsite
   Quiz page styles: progress bar, cards, sliders, toggles
   ─────────────────────────────────────────────────────── */

/* ── Progress bar ── */
#progress-bar-wrap {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--border);
    z-index: 100;
}

.question-desc {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-bottom: var(--space-md);
}

.rent-slider-wrap {
    display: grid;
    gap: var(--space-md);
    margin-top: var(--space-sm);
}

.sub-slider-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    box-shadow: var(--shadow-xs);
}

.sub-label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.rent-slider-wrap input[type="range"] {
    width: 100%;
    margin: 8px 0;
}

.slider-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-secondary);
}

.slider-row .slider-hint {
    font-size: 11px;
    color: var(--text-tertiary);
}

#progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-mid));
    width: 0%;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0 2px 2px 0;
}

/* ── Header ── */
#quiz-header {
    position: sticky;
    top: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    z-index: 90;
    padding: 12px 0;
}

.quiz-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.quiz-brand {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.3px;
}

.progress-text {
    font-size: 12px;
    color: var(--text-tertiary);
    font-weight: 500;
}

/* ── Main container ── */
#quiz-container {
    padding: var(--space-xl) 0 120px;
    min-height: 100vh;
}

/* ── Question text ── */
.question-text {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.45;
    margin-bottom: var(--space-lg);
}

@media (max-width: 480px) {
    .question-text { font-size: 18px; }
}

/* ── Card grid ── */
.card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

@media (min-width: 600px) {
    .card-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ── Option card ── */
.option-card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-sm);
    cursor: pointer;
    transition: border-color 0.18s, box-shadow 0.18s, transform 0.12s;
    text-align: center;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.option-card:hover {
    border-color: var(--primary-mid);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.option-card.selected {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(15,110,86,0.12);
}

.option-card .opt-icon {
    font-size: 24px;
    margin-bottom: var(--space-xs);
    text-align: center;
}

.option-card .opt-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.option-card .opt-sub {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 2px;
}

.option-card .opt-price {
    font-size: 11px;
    color: var(--primary);
    font-weight: 500;
    margin-top: 4px;
}

.option-card .opt-note,
.option-card .opt-build {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
    line-height: 1.3;
}

.option-card .opt-mult {
    margin-top: 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    display: inline-block;
    padding: 3px 8px;
}

.option-card.selected .opt-mult {
    background: rgba(15,110,86,0.18);
}

/* ── Image select card ── */
.option-card .opt-img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-sm);
    background: var(--gray-bg);
}

.opt-img-placeholder {
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: var(--radius-sm);
    background: var(--gray-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: var(--space-sm);
}

/* ── Toggle cards ── */
.toggle-opts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.toggle-card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    cursor: pointer;
    transition: border-color 0.18s, box-shadow 0.18s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.toggle-card:hover {
    border-color: var(--primary-mid);
    box-shadow: var(--shadow-sm);
}

.toggle-card.selected {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(15,110,86,0.12);
}

.toggle-card .opt-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.toggle-card .opt-sub {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* ── Conditional area ── */
#conditional-area {
    margin-top: var(--space-md);
}

/* ── Slider ── */
.slider-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
}

.slider-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: var(--space-sm);
}

.slider-val {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    min-width: 100px;
}

.slider-hint {
    font-size: 12px;
    color: var(--text-tertiary);
    text-align: right;
}

/* ── Sub-slider (conditional) ── */
.sub-slider-wrap {
    background: var(--gray-bg);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-top: var(--space-sm);
    animation: fadeIn 0.25s ease;
}

.sub-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.sub-slider-wrap input[type="range"] {
    margin-bottom: var(--space-xs);
}

.sub-slider-wrap span {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
}

/* ── Navigation area ── */
#nav-area {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: var(--space-md);
    z-index: 80;
}

#nav-area .container {
    display: flex;
    justify-content: flex-end;
}

#btn-next {
    background: var(--primary);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    padding: 12px 32px;
    border-radius: var(--radius-md);
    transition: background 0.18s, opacity 0.18s, transform 0.12s;
    min-width: 140px;
}

#btn-next:hover:not(:disabled) {
    background: #0a5a46;
    transform: translateY(-1px);
}

#btn-next:active:not(:disabled) {
    transform: translateY(0);
}

#btn-next:disabled {
    background: var(--border-strong);
    color: var(--text-tertiary);
    cursor: not-allowed;
}

/* ── Animations ── */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

#question-area {
    animation: fadeIn 0.3s ease;
}

/* ── Mobile adjustments ── */
@media (max-width: 480px) {
    #quiz-container { padding-top: var(--space-lg); }
    .slider-val     { font-size: 18px; }
    #btn-next       { width: 100%; }
    #nav-area .container { justify-content: stretch; }
}
