/* ============================================================
   QTW Family — Welcome Flow Styles
   ============================================================ */

/* ── Overlay ────────────────────────────────────────────────── */
#qtw-welcome-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity .35s ease;
}
#qtw-welcome-overlay.qtw-wf-visible {
    opacity: 1;
    pointer-events: all;
}
#qtw-welcome-overlay.qtw-wf-exit {
    opacity: 0;
    pointer-events: none;
}

/* ── Backdrop ───────────────────────────────────────────────── */
.qtw-wf-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.55);
    backdrop-filter: blur(3px);
}

/* ── Modal ──────────────────────────────────────────────────── */
.qtw-wf-modal {
    position: relative;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* ── Progress bar ───────────────────────────────────────────── */
.qtw-wf-progress {
    height: 4px;
    background: #e9ecef;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
    flex-shrink: 0;
}
.qtw-wf-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #051a15, #52b788);
    transition: width .4s ease;
}

/* ── Body ───────────────────────────────────────────────────── */
.qtw-wf-body {
    padding: 2rem 2.5rem 2.5rem;
}

/* ── Steps ──────────────────────────────────────────────────── */
.qtw-wf-step {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ── Icons ──────────────────────────────────────────────────── */
.qtw-wf-icon,
.qtw-wf-done-icon {
    font-size: 3rem;
    line-height: 1;
    text-align: center;
}

/* ── Typography ─────────────────────────────────────────────── */
.qtw-wf-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1b4332;
    line-height: 1.25;
    margin: 0;
    text-align: center;
}
.qtw-wf-body-text {
    font-size: 1rem;
    line-height: 1.65;
    color: #444;
    margin: 0;
    text-align: center;
}
.qtw-wf-caption {
    font-size: .85rem;
    color: #777;
    text-align: center;
    font-style: italic;
    margin: 0;
}
.qtw-wf-helper-note {
    background: #f0f7f4;
    border: 1px solid #c8e6c9;
    border-radius: 8px;
    padding: .75rem 1rem;
    font-size: .9rem;
    color: #051a15;
    text-align: center;
}
.qtw-wf-helper-note a {
    color: #1b4332;
    font-weight: 600;
}

/* ── Tour grid ──────────────────────────────────────────────── */
.qtw-wf-tour-grid {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}
.qtw-wf-tour-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    padding: .85rem 1rem;
}
.qtw-wf-tour-icon {
    font-size: 1.6rem;
    line-height: 1;
    flex-shrink: 0;
}
.qtw-wf-tour-item strong {
    display: block;
    color: #1b4332;
    margin-bottom: .2rem;
}
.qtw-wf-tour-item p {
    margin: 0;
    font-size: .9rem;
    color: #555;
    line-height: 1.4;
}

/* ── Form ───────────────────────────────────────────────────── */
.qtw-wf-form {
    display: flex;
    flex-direction: column;
    gap: .85rem;
}
.qtw-wf-field {
    display: flex;
    flex-direction: column;
    gap: .3rem;
}
.qtw-wf-field label {
    font-size: .9rem;
    font-weight: 600;
    color: #333;
}
.qtw-wf-optional {
    font-weight: 400;
    color: #888;
    font-size: .85rem;
}
.qtw-wf-field input,
.qtw-wf-field select,
.qtw-wf-field textarea {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: .6rem .85rem;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
    transition: border-color .15s;
}
.qtw-wf-field input:focus,
.qtw-wf-field select:focus,
.qtw-wf-field textarea:focus {
    outline: none;
    border-color: #051a15;
    box-shadow: 0 0 0 3px rgba(15,74,56,.12);
}
.qtw-wf-field textarea {
    resize: vertical;
}

/* ── Member type buttons ────────────────────────────────────── */
.qtw-wf-type-btns {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.qtw-wf-type-btn {
    padding: .4rem .85rem;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    background: #fff;
    cursor: pointer;
    font-size: .9rem;
    transition: all .15s;
}
.qtw-wf-type-btn:hover { border-color: #051a15; }
.qtw-wf-type-btn.active {
    background: #051a15;
    color: #fff;
    border-color: #051a15;
}

/* ── Actions ────────────────────────────────────────────────── */
.qtw-wf-actions {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    align-items: center;
}

/* ── Buttons ────────────────────────────────────────────────── */
.qtw-wf-btn {
    display: block;
    width: 100%;
    padding: .8rem 1.5rem;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    transition: opacity .15s, transform .1s;
    text-decoration: none;
}
.qtw-wf-btn:hover { opacity: .88; transform: translateY(-1px); }
.qtw-wf-btn:active { transform: none; }
.qtw-wf-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.qtw-wf-btn--primary {
    background: #051a15;
    color: #fff;
}
.qtw-wf-btn--ghost {
    background: transparent;
    color: #888;
    font-weight: 400;
    font-size: .9rem;
    padding: .4rem;
}
.qtw-wf-btn--ghost:hover { color: #333; opacity: 1; transform: none; }

/* ── Error ──────────────────────────────────────────────────── */
.qtw-wf-error {
    color: #c0392b;
    font-size: .9rem;
    text-align: center;
    padding: .5rem;
    background: #fdf2f2;
    border-radius: 6px;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 600px) {
    .qtw-wf-body { padding: 1.5rem 1.25rem 2rem; }
    .qtw-wf-title { font-size: 1.3rem; }
    .qtw-wf-modal { max-height: 95vh; border-radius: 12px; }
}