/* ══════════════════════════════════════
   V2 Registration Modal - Typeform Style
   ══════════════════════════════════════ */

/* ── Overlay ── */
.rv2-overlay {
    position: fixed;
    inset: 0;
    z-index: 60;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.rv2-overlay.rv2--open { opacity: 1; }

/* ── Modal ── */
.rv2-modal {
    position: relative;
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    transform: translateY(20px) scale(0.97);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    overflow: visible;
}
.rv2-overlay.rv2--open .rv2-modal {
    transform: translateY(0) scale(1);
}

/* ── Top bar ── */
.rv2-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px 10px;
    flex-shrink: 0;
}
.rv2-back {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    line-height: 0;
    transition: color 0.2s;
    flex-shrink: 0;
}
.rv2-back:hover { color: #374151; }

.rv2-progress {
    flex: 1;
    height: 3px;
    background: #f3f4f6;
    border-radius: 3px;
    overflow: hidden;
}
.rv2-progress-bar {
    height: 100%;
    width: 0%;
    background: #111827;
    border-radius: 3px;
    transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.rv2-close {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    line-height: 0;
    transition: color 0.2s;
    flex-shrink: 0;
}
.rv2-close:hover { color: #374151; }

/* ── Body / steps ── */
.rv2-body {
    position: relative;
    min-height: 320px;
    overflow: hidden;
}

.rv2-step {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateY(16px);
    transition: opacity 0.28s ease, transform 0.28s ease;
}
.rv2-step--active {
    position: relative;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.rv2-step--out {
    opacity: 0;
    transform: translateY(-12px);
}
.rv2-step--out-back {
    opacity: 0;
    transform: translateY(12px);
}

/* ── Content block ── */
.rv2-content {
    width: 100%;
    padding: 20px 32px 28px;
    box-sizing: border-box;
}

/* ── Typography ── */
.rv2-heading {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.45rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.35;
    margin: 0 0 24px;
}
.rv2-sub {
    font-size: 0.9rem;
    color: #6b7280;
    margin: -16px 0 24px;
    line-height: 1.5;
}

/* ── Underline inputs ── */
.rv2-field { margin-bottom: 20px; }

.rv2-underline {
    width: 100%;
    padding: 10px 0;
    font-size: 1.15rem;
    color: #111827;
    background: transparent;
    border: none;
    border-bottom: 2px solid #e5e7eb;
    outline: none;
    transition: border-color 0.25s;
    box-sizing: border-box;
}
.rv2-underline::placeholder { color: #c9cdd4; }
.rv2-underline:focus { border-color: #111827; }
.rv2-underline.rv2--invalid { border-color: #ef4444; }
.rv2-underline.rv2--invalid:focus { border-color: #ef4444; }

.rv2-error {
    display: none;
    font-size: 0.78rem;
    color: #ef4444;
    margin-top: 6px;
}
.rv2-error.rv2--show { display: block; }

/* ── Continue button ── */
.rv2-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px;
    margin-top: 8px;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    background: #111827;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}
.rv2-btn:hover { background: #000; }
.rv2-btn:active { transform: scale(0.98); }
.rv2-btn--accent {
    background: linear-gradient(135deg, #111827, #374151);
}
.rv2-btn--accent:hover {
    background: linear-gradient(135deg, #000, #1f2937);
}

/* ── Yes/No choice cards ── */
.rv2-choices {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.rv2-choice {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    font-size: 1.05rem;
    font-weight: 600;
    color: #374151;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}
.rv2-choice:hover {
    border-color: #111827;
    background: #f9fafb;
}
.rv2-choice.rv2-choice--picked {
    border-color: #111827;
    background: #111827;
    color: #fff;
}

/* ── Mini review card ── */
.rv2-review {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #f3f4f6;
}
.rv2-review-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.rv2-review-body { flex: 1; min-width: 0; }
.rv2-review-top {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 3px;
}
.rv2-stars {
    display: inline-flex;
    gap: 1px;
}
.rv2-stars svg {
    width: 12px;
    height: 12px;
}
.rv2-review-name {
    font-size: 0.72rem;
    font-weight: 600;
    color: #374151;
}
.rv2-review-from {
    font-weight: 400;
    color: #9ca3af;
}
.rv2-review-text {
    font-size: 0.72rem;
    color: #6b7280;
    line-height: 1.4;
    margin: 0;
}

/* ── Spots urgency ── */
.rv2-spots {
    text-align: center;
    font-size: 0.75rem;
    color: #ef4444;
    margin-top: 10px;
    margin-bottom: 0;
}

/* ── Thank you ── */
.rv2-thankyou {
    text-align: center;
}
.rv2-ty-content {
    padding: 32px 28px 28px;
}
.rv2-ty-check {
    width: 52px;
    height: 52px;
    margin: 0 auto 16px;
    color: #22c55e;
}
.rv2-ty-check svg { width: 100%; height: 100%; }
.rv2-thankyou .rv2-heading {
    margin-bottom: 6px;
}
.rv2-ty-msg {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 20px;
}
.rv2-ty-phone-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 16px;
    text-align: left;
}
.rv2-ty-phone-icon {
    position: relative;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: #22c55e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.rv2-ty-phone-icon svg {
    width: 20px;
    height: 20px;
    color: #fff;
}
.rv2-ty-ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid #22c55e;
    opacity: 0;
    animation: rv2ring 1.5s ease-out infinite;
}
@keyframes rv2ring {
    0% { transform: scale(0.8); opacity: 0.6; }
    100% { transform: scale(1.4); opacity: 0; }
}
.rv2-ty-phone-bold {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
}
.rv2-ty-phone-sub {
    font-size: 0.82rem;
    color: #4b5563;
    line-height: 1.45;
}
.rv2-ty-keep {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 16px;
}

/* ── Loading ── */
.rv2-loading {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.97);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    z-index: 5;
    text-align: center;
    padding: 24px;
}
.rv2-load-msg {
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827;
    margin-top: 18px;
    min-height: 1.4em;
    transition: opacity 0.3s ease;
}
.rv2-load-msg.rv2-load-msg--fade { opacity: 0; }
.rv2-load-warn {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 14px;
}

/* ── intl-tel-input ── */
#regModalV2 .iti--allow-dropdown { width: 100%; }
#regModalV2 .iti input { width: 100%; }
#regModalV2 .iti__country-list {
    z-index: 70;
    max-height: 180px;
}

/* ── Mobile ── */
@media (max-width: 640px) {
    .rv2-overlay { padding: 0; align-items: flex-end; }
    .rv2-modal {
        max-width: 100%;
        border-radius: 14px 14px 0 0;
    }
    .rv2-body { min-height: 300px; }
    .rv2-content { padding: 16px 24px 24px; }
    .rv2-heading { font-size: 1.25rem; }
    .rv2-choice { padding: 13px; }
}

/* ── Scroll lock ── */
body.rv2-open { overflow: hidden; }
