/* ===========================
   TARJETAS DE BIENVENIDA (3 pasos: foto y nombre → datos personales →
   biografía). Solo se muestran una vez, justo después de que una cuenta se
   registra (ver js/onboarding.js + el evento "lb:new-user" de
   js/firebase-auth.js). Arriba se ve el perfil armándose en vivo con el MISMO
   orden que el perfil real: sobre la foto solo el nombre y el @usuario; la
   biografía y los chips (ciudad, edad, miembro desde) van debajo.
   Namespace propio ".lb-onb-*" / ".lb-ob-*" para no pisar ningún estilo.
   =========================== */

.lb-onb-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100040; /* justo debajo del editor de recorte de foto (100050),
                         para que ese editor pueda abrirse ENCIMA de esto */
    background: rgba(10, 14, 39, 0.78);
    backdrop-filter: blur(3px);
    align-items: center;
    justify-content: center;
}

.lb-onb-overlay.active {
    display: flex;
}

.lb-ob {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    background: var(--bg-card, #FFFFFF);
    color: var(--text-primary, #1A1A1A);
    overflow: hidden;
}

@media (min-width: 520px) {
    .lb-ob {
        height: min(100%, 780px);
        border-radius: 28px;
        box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    }
}

/* ---- foto grande con nombre y @usuario ---- */
.lb-ob-cover {
    position: relative;
    flex: none;
    height: 206px;
    color: #fff;
    background: linear-gradient(160deg, #FF6B35 0%, #FF3CAC 55%, #784BA0 100%);
    overflow: hidden;
}

.lb-ob-cover::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 120px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0));
    pointer-events: none;
}

.lb-ob-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.lb-ob-ph {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 20px;
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 72px;
    opacity: 0.28;
}

.lb-ob-top {
    position: absolute;
    left: 14px;
    right: 14px;
    top: calc(14px + env(safe-area-inset-top, 0px));
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 12px;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.lb-ob-skipall {
    border: none;
    border-radius: 999px;
    padding: 7px 13px;
    background: rgba(0, 0, 0, 0.32);
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
}

.lb-ob-who {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 30px;
    z-index: 2;
    text-align: left;
}

.lb-ob-nm {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 22px;
    line-height: 1.15;
    min-height: 25px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

.lb-ob-un {
    margin-top: 1px;
    font-size: 13px;
    opacity: 0.95;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

/* ---- hoja con biografía y chips (igual que en el perfil real) ---- */
.lb-ob-info {
    position: relative;
    z-index: 1;
    flex: none;
    margin-top: -18px;
    padding: 13px 16px 8px;
    border-radius: 22px 22px 0 0;
    background: var(--bg-card, #FFFFFF);
}

.lb-ob-bio {
    font-size: 13px;
    line-height: 1.4;
    min-height: 18px;
    max-height: 58px;
    overflow: hidden;
    word-break: break-word;
    color: var(--text-primary, #1A1A1A);
}

.lb-ob-bio.empty {
    color: var(--text-dim, #B2B5C6);
    font-style: italic;
}

.lb-ob-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.lb-ob-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 60, 172, 0.1);
    color: #A3186F;
    font-size: 11.5px;
    font-weight: 600;
}

.lb-ob-pill.empty {
    background: var(--bg-secondary, #F3F4F9);
    color: var(--text-dim, #B2B5C6);
    font-style: italic;
}

/* ---- tarjeta del paso (hoja inferior) ---- */
.lb-ob-sheet {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 12px 18px calc(8px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--border-primary, rgba(0, 0, 0, 0.07));
    background: var(--bg-card, #FFFFFF);
}

.lb-ob-prog {
    height: 5px;
    border-radius: 3px;
    margin-bottom: 10px;
    background: var(--bg-secondary, #ECEDF4);
    overflow: hidden;
}

.lb-ob-prog i {
    display: block;
    height: 100%;
    width: 33%;
    border-radius: 3px;
    background: var(--gradient, linear-gradient(135deg, #FF6B35, #FF3CAC, #784BA0));
    transition: width 0.3s;
}

.lb-ob-stepno {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #FF3CAC;
    margin-bottom: 2px;
}

.lb-ob-step {
    display: none;
}

.lb-ob-step.active {
    display: block;
    animation: lbObUp 0.28s ease;
}

@keyframes lbObUp {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}

.lb-ob-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 20px;
    margin: 0 0 3px;
    color: var(--text-primary, #1A1A1A);
}

.lb-ob-sub {
    font-size: 13px;
    line-height: 1.45;
    margin: 0 0 12px;
    color: var(--text-secondary, #666666);
}

.lb-ob-fld {
    text-align: left;
    margin-bottom: 11px;
}

.lb-ob-fld label {
    display: block;
    margin-bottom: 5px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 12px;
    color: var(--text-secondary, #44475A);
}

.lb-ob-in {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1.5px solid var(--border-primary, #E3E5EE);
    background: var(--bg-secondary, #F7F8FC);
    color: var(--text-primary, #1A1A1A);
    font-family: inherit;
    font-size: 16px; /* 16px evita el zoom automático de iOS al enfocar */
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

select.lb-ob-in {
    background-image: linear-gradient(45deg, transparent 50%, #9A9DB0 50%), linear-gradient(135deg, #9A9DB0 50%, transparent 50%);
    background-position: calc(100% - 20px) 52%, calc(100% - 14px) 52%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 36px;
}

textarea.lb-ob-in {
    min-height: 78px;
    resize: none;
}

.lb-ob-in:focus {
    border-color: #FF3CAC;
    background: var(--bg-card, #FFFFFF);
}

.lb-ob-photo-btn {
    display: inline-block;
    margin: 0 0 12px;
    padding: 0;
    border: none;
    background: none;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 13.5px;
    color: #FF3CAC;
    cursor: pointer;
}

.lb-ob-photo-btn.busy {
    opacity: 0.55;
    pointer-events: none;
}

.lb-ob-togs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.lb-ob-tog {
    padding: 8px 13px;
    border-radius: 999px;
    border: 1.5px solid var(--border-primary, #E3E5EE);
    background: var(--bg-secondary, #F7F8FC);
    color: var(--text-secondary, #44475A);
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 12.5px;
    cursor: pointer;
}

.lb-ob-tog.on {
    background: rgba(255, 60, 172, 0.12);
    border-color: #FF3CAC;
    color: #C71784;
}

.lb-ob-hint {
    margin-top: 6px;
    font-size: 11.5px;
    line-height: 1.4;
    color: var(--text-dim, #8B8EA2);
}

.lb-ob-next {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 13px;
    border: none;
    border-radius: 999px;
    background: var(--gradient, linear-gradient(135deg, #FF6B35, #FF3CAC, #784BA0));
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(255, 60, 172, 0.3);
}

.lb-ob-next:disabled {
    opacity: 0.6;
    cursor: default;
}

.lb-ob-skip {
    display: block;
    width: 100%;
    margin-top: 2px;
    padding: 10px;
    border: none;
    background: none;
    color: var(--text-dim, #7B7E92);
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
}

.lb-ob-skip:hover {
    color: var(--text-secondary, #44475A);
    text-decoration: underline;
}

@media (max-height: 640px) {
    .lb-ob-cover { height: 150px; }
    .lb-ob-ph { font-size: 52px; }
    .lb-ob-who { bottom: 26px; }
    .lb-ob-sub { display: none; }
}

/* ===== Correo / teléfono de contacto en el perfil =====
   Chips tocables (perfil propio y perfil de otra persona): el enlace se
   estira sobre TODO el chip para que se pueda tocar en cualquier parte. */
.lb-chip-contact { position: relative; cursor: pointer; }
.lb-chip-contact a { text-decoration: none; }
.lb-chip-contact a::after { content: ''; position: absolute; inset: 0; border-radius: 16px; }
.lb-chip-contact:active { filter: brightness(.94); }
