/* ═══════════════════════════════════════════════════════════════
   css/ritual-iniciante.css  v3
   Ritual de Entrada — overlay fullscreen de onboarding
   Namespace: .ri-*

   v3 — 25/05/2026
     - Design: textos explicativos/descritivos → branco puro (#fff)
     - Design: labels de campo → rgba(255,255,255,0.72) (mais visíveis)
     - Design: supertitle + dica-label + info-btn + btn-secondary → dourado sólido
     - JS: campo "última menstruação" usa roller customizado (igual slide 3)

   Tom mais caloroso que o sexta-ritual — cards com leve dourado no fundo.
   Usa variáveis do :root global — nunca hex hardcoded.
   ═══════════════════════════════════════════════════════════════ */

/* ── Overlay ──────────────────────────────────────────────────── */
.ri-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg, #080808);
    z-index: 10000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* Grain texture sutil */
.ri-overlay::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    background-size: 200px 200px;
    pointer-events: none;
    z-index: 0;
}

.ri-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    min-height: 100dvh;
    min-height: 100vh; /* fallback */
    padding: 60px 24px max(56px, calc(24px + env(safe-area-inset-bottom, 0px)));
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

/* ── Progress bar ─────────────────────────────────────────────── */
.ri-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(212,175,55,0.15);
    z-index: 2;
    transition: opacity 0.3s;
}

.ri-progress--hidden {
    opacity: 0;
    pointer-events: none;
}

.ri-progress__fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold, #D4AF37), #F0D060);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
}

/* ── Close button ─────────────────────────────────────────────── */
.ri-close {
    position: fixed;
    top: 14px;
    right: 16px;
    z-index: 10001;
    background: rgba(255,255,255,0.07);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    color: rgba(255,255,255,0.55);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.ri-close:hover {
    background: rgba(255,255,255,0.13);
    color: rgba(255,255,255,0.9);
}

/* ── Slides ───────────────────────────────────────────────────── */
.ri-slide {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ri-slide--hidden {
    display: none !important;
}

.ri-slide--entering {
    animation: ri-slide-in 0.35s ease forwards;
}

@keyframes ri-slide-in {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Slide content containers ─────────────────────────────────── */
.ri-slide-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ri-slide-content--centered {
    text-align: center;
    align-items: center;
}

/* ── Typography ───────────────────────────────────────────────── */
.ri-supertitle {
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: var(--gold, #D4AF37);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin: 0;
}

.ri-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 26px;
    font-weight: 700;
    color: var(--gold, #D4AF37);
    line-height: 1.25;
    margin: 0;
}

.ri-title--hero {
    font-size: 32px;
}

.ri-subtitle {
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: #fff;
    margin: -12px 0 0;
    line-height: 1.6;
}

.ri-body {
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    color: #fff;
    line-height: 1.7;
    max-width: 340px;
    margin: 0;
}

.ri-footer-note {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    color: rgba(255,255,255,0.55);
    margin: -8px 0 0;
}

.ri-rodape-note {
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: #fff;
    margin: -4px 0 0;
    text-align: center;
    line-height: 1.55;
}

/* ── Primary / Secondary buttons ─────────────────────────────── */
.ri-btn-primary {
    background: linear-gradient(135deg, #F0D060 0%, #D4AF37 45%, #9A7520 100%);
    color: #1A1200;
    border: none;
    border-radius: 18px;
    padding: 16px 28px;
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    max-width: 340px;
    margin-top: 4px;
    transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
    align-self: center;
    letter-spacing: 0.01em;
}

.ri-btn-primary:hover:not(:disabled) {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(212,175,55,0.35);
}

.ri-btn-primary:active:not(:disabled) { transform: translateY(0); }

.ri-btn-primary:disabled {
    opacity: 0.32;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.ri-btn-secondary {
    background: transparent;
    border: 1.5px solid rgba(212,175,55,0.35);
    border-radius: 18px;
    padding: 12px 28px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--gold, #D4AF37);
    cursor: pointer;
    width: 100%;
    max-width: 340px;
    margin-top: -8px;
    align-self: center;
    transition: border-color 0.2s, color 0.2s;
}

.ri-btn-secondary:hover {
    border-color: var(--gold, #D4AF37);
    color: var(--gold, #D4AF37);
}

/* ── Form fields ──────────────────────────────────────────────── */
.ri-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.ri-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ri-field--toggle {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 12px 16px;
}

.ri-field__label {
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255,255,255,0.72);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ri-optional {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    font-size: 11px;
    color: #fff;
}

.ri-field__input {
    background: rgba(255,255,255,0.07);
    border: 1.5px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    padding: 12px 14px;
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    color: rgba(255,255,255,0.92);
    width: 100%;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.ri-field__input:focus {
    border-color: var(--gold, #D4AF37);
    background: rgba(255,255,255,0.09);
}

.ri-field__hint {
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    color: #fff;
    margin-top: -2px;
}

.ri-field__input-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ri-field__input-row .ri-field__input { flex: 1; }

.ri-field__unit {
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: #fff;
    flex-shrink: 0;
    font-weight: 600;
}

/* ── Toggle ───────────────────────────────────────────────────── */
.ri-toggle {
    background: rgba(255,255,255,0.07);
    border: 1.5px solid rgba(255,255,255,0.15);
    border-radius: 20px;
    padding: 7px 18px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.ri-toggle--on {
    background: rgba(212,175,55,0.14);
    border-color: var(--gold, #D4AF37);
    color: var(--gold, #D4AF37);
}

/* ── Chips ────────────────────────────────────────────────────── */
.ri-chips-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ri-chip {
    background: rgba(255,255,255,0.06);
    border: 1.5px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 8px 16px;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    cursor: pointer;
    transition: all 0.18s;
    white-space: nowrap;
    text-align: left;
}

.ri-chip:hover {
    background: rgba(255,255,255,0.09);
    border-color: rgba(255,255,255,0.2);
}

.ri-chip--selected {
    background: rgba(212,175,55,0.14);
    border-color: var(--gold, #D4AF37);
    color: var(--gold, #D4AF37);
}

/* ── Chips de biótipo (coluna, com descrição) ─────────────────── */
.ri-field--biotipo { margin-top: 6px; }

.ri-chips-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ri-chip--bio {
    border-radius: 14px;
    padding: 12px 16px;
    white-space: normal;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ri-chip__title {
    font-size: 14px;
    font-weight: 700;
    display: block;
}

.ri-chip__desc {
    font-size: 12px;
    font-weight: 400;
    color: #fff;
    display: block;
    line-height: 1.5;
}

.ri-chip--bio.ri-chip--selected .ri-chip__desc {
    color: var(--gold, #D4AF37);
}

/* ── Atividade física — bloco ─────────────────────────────────── */
.ri-actq-block {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ri-actq-row {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.ri-actq__label {
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

/* ── Foto ─────────────────────────────────────────────────────── */
.ri-field--foto { gap: 0; }

.ri-foto-area { margin-top: 4px; }

.ri-foto-btn {
    background: rgba(255,255,255,0.05);
    border: 1px dashed rgba(255,255,255,0.2);
    border-radius: 14px;
    padding: 14px 20px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: rgba(255,255,255,0.85);
    cursor: pointer;
    width: 100%;
    text-align: center;
    transition: background 0.2s, border-color 0.2s;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ri-foto-btn:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.5);
}

.ri-foto-btn--done {
    border-color: rgba(212,175,55,0.5);
    background: rgba(212,175,55,0.06);
}

.ri-foto-avatar-preview {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--gold, #D4AF37);
}

.ri-foto-preview {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
    border: 1.5px solid rgba(212,175,55,0.5);
}

.ri-foto-note {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    color: #fff;
    margin: 7px 0 0;
    line-height: 1.55;
}

/* ── Info balloon ─────────────────────────────────────────────── */
.ri-info-btn {
    background: none;
    border: none;
    color: var(--gold, #D4AF37);
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    line-height: 1;
}

.ri-info-balloon {
    background: rgba(212,175,55,0.08);
    border: 1px solid rgba(212,175,55,0.2);
    border-radius: 10px;
    padding: 10px 14px;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    color: #fff;
    line-height: 1.6;
    margin-bottom: 4px;
}

/* ── Peso de largada (slide 6) ────────────────────────────────── */
.ri-peso-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 18px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ri-peso-card--today {
    border-color: rgba(212,175,55,0.3);
    background: rgba(212,175,55,0.05);
}

.ri-peso-card__label {
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.ri-peso-card__input-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.ri-peso-input {
    flex: 1;
    background: transparent;
    border: none;
    border-bottom: 1.5px solid rgba(255,255,255,0.18);
    padding: 6px 0;
    font-family: 'DM Sans', sans-serif;
    font-size: 36px;
    font-weight: 700;
    color: #fff;
    outline: none;
    min-width: 0;
    transition: border-color 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.ri-peso-input:focus { border-color: var(--gold, #D4AF37); }
.ri-peso-input::placeholder { color: rgba(255,255,255,0.18); }

.ri-peso-unit {
    font-family: 'DM Sans', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    flex-shrink: 0;
}

/* ── Warning / confirmação ────────────────────────────────────── */
.ri-warn {
    background: rgba(255,195,90,0.08);
    border: 1px solid rgba(255,195,90,0.25);
    border-radius: 14px;
    padding: 14px 16px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: rgba(255,210,120,0.9);
    line-height: 1.55;
}

.ri-warn-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.ri-warn-btn {
    background: rgba(255,255,255,0.09);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 10px;
    padding: 8px 16px;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.ri-warn-btn--confirm {
    background: rgba(212,175,55,0.16);
    border-color: rgba(212,175,55,0.4);
    color: var(--gold, #D4AF37);
}

/* ── Step messages (slide 7) ──────────────────────────────────── */
.ri-step-msgs {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    text-align: left;
}

.ri-step-msg {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    color: rgba(255,255,255,0.25);
    transition: color 0.35s;
}

.ri-step-msg--active { color: #fff; }
.ri-step-msg--done   { color: var(--gold, #D4AF37); }

.ri-step-msg__dot {
    font-size: 9px;
    flex-shrink: 0;
    width: 16px;
    text-align: center;
}

.ri-step-msg--active .ri-step-msg__dot {
    animation: ri-step-pulse 1s ease-in-out infinite;
}

@keyframes ri-step-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

.ri-step-msg__text { flex: 1; }

/* ── Resultados (slide 7) ─────────────────────────────────────── */
.ri-results {
    width: 100%;
    max-width: 360px;
    margin-top: 20px;
    animation: ri-slide-in 0.5s ease forwards;
}

.ri-results__title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--gold, #D4AF37);
    text-align: center;
    margin-bottom: 16px;
}

.ri-result-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ri-result-card {
    background: rgba(212,175,55,0.08);
    border: 1px solid rgba(212,175,55,0.2);
    border-radius: 18px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.ri-result-card__icon { font-size: 22px; flex-shrink: 0; }

.ri-result-card__label {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    flex: 1;
}

.ri-result-card__value {
    font-family: 'DM Sans', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--gold, #D4AF37);
    flex-shrink: 0;
}

.ri-result-card__unit {
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    color: #fff;
    flex-shrink: 0;
    margin-left: -8px;
}

.ri-results__meta-4sem {
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    color: #fff;
    text-align: center;
    margin: 14px 0 4px;
}

.ri-results__meta-4sem strong {
    color: var(--gold, #D4AF37);
}

.ri-results__rodape {
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    color: #fff;
    text-align: center;
    line-height: 1.6;
    margin-top: 10px;
}

/* ── Tour (slide 8) ───────────────────────────────────────────── */
.ri-tour-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-padding: 0 24px;
    padding-bottom: 4px;
    /* Ocultar scrollbar */
    scrollbar-width: none;
}
.ri-tour-track::-webkit-scrollbar { display: none; }

.ri-tour-card {
    flex: 0 0 calc(100% - 48px);
    scroll-snap-align: start;
    background: rgba(212,175,55,0.06);
    border: 1px solid rgba(212,175,55,0.15);
    border-radius: 20px;
    padding: 24px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 240px;
}

.ri-tour-card__icon {
    font-size: 28px;
    line-height: 1;
}

.ri-tour-card__title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--gold, #D4AF37);
    margin: 0;
    line-height: 1.3;
}

.ri-tour-card__body {
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: #fff;
    line-height: 1.65;
    margin: 0;
    flex: 1;
}

.ri-tour-card__rodape {
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin: 0;
}

.ri-tour-dots {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin-top: -8px;
}

.ri-tour-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    transition: background 0.25s, transform 0.25s;
    cursor: pointer;
}

.ri-tour-dot--active {
    background: var(--gold, #D4AF37);
    transform: scale(1.2);
}

/* ── Dica card (slide 9) ──────────────────────────────────────── */
.ri-dica-card {
    background: rgba(212,175,55,0.07);
    border: 1px solid rgba(212,175,55,0.2);
    border-radius: 16px;
    padding: 16px 20px;
    max-width: 320px;
    width: 100%;
    text-align: left;
}

.ri-dica-card--desafia {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.14);
    margin-top: -4px;
}

.ri-dica-card__label {
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: var(--gold, #D4AF37);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 6px;
}

.ri-dica-card__text {
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: #fff;
    line-height: 1.6;
    margin: 0;
}

/* ── Date Picker roleta (slide 3) ─────────────────────────────── */
.ri-date-picker {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255,255,255,0.07);
    border: 1.5px solid rgba(255,255,255,0.12);
    border-radius: 14px;
    padding: 0 12px;
    height: 144px;
    overflow: hidden;
    position: relative;
}

/* Linhas de seleção */
.ri-date-picker::before,
.ri-date-picker::after {
    content: '';
    position: absolute;
    left: 0; right: 0;
    height: 44px;
    pointer-events: none;
    z-index: 2;
}
.ri-date-picker::before {
    top: 50px;
    border-top: 1.5px solid rgba(212,175,55,0.45);
}
.ri-date-picker::after {
    top: 94px;
    border-bottom: 1.5px solid rgba(212,175,55,0.45);
}

/* Fade superior e inferior */
.ri-date-col {
    flex: 1;
    height: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    position: relative;
    /* scroll-padding-top alinha o snap-align:start de cada item à zona de seleção (50px) */
    scroll-padding-top: 50px;
    /* Fade iOS-style: itens fora da zona de seleção desvanecem */
    -webkit-mask-image: linear-gradient(to bottom,
        transparent 0px,
        rgba(0,0,0,0.55) 22px,
        black 50px,
        black 94px,
        rgba(0,0,0,0.55) 118px,
        transparent 144px
    );
    mask-image: linear-gradient(to bottom,
        transparent 0px,
        rgba(0,0,0,0.55) 22px,
        black 50px,
        black 94px,
        rgba(0,0,0,0.55) 118px,
        transparent 144px
    );
}
.ri-date-col::-webkit-scrollbar { display: none; }
.ri-date-col--year { flex: 1.4; }

.ri-date-col__track {
    padding: 50px 0 50px;
}

.ri-date-item {
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'DM Sans', sans-serif;
    font-size: 17px;
    font-weight: 500;
    color: rgba(255,255,255,0.3);
    cursor: pointer;
    scroll-snap-align: start;
    transition: color 0.15s, font-weight 0.15s;
    user-select: none;
    -webkit-user-select: none;
}

.ri-date-item--selected {
    color: #fff;
    font-weight: 700;
    font-size: 18px;
}

.ri-date-sep {
    font-family: 'DM Sans', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    align-self: center;
    padding-bottom: 2px;
}
