/* ============================================================
   ONBOARDING MODAL — Jobetto
   Aggiungere in fondo ad assets/css/style.css
   ============================================================ */

/* ── OVERLAY ── */
#ob-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 1000;
    display: flex; align-items: flex-end;
    animation: obFadeIn .25s ease;
}
@keyframes obFadeIn { from{opacity:0} to{opacity:1} }

/* ── MODAL (bottom-sheet su mobile, centrato su desktop) ── */
#ob-modal {
    background: #fff;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    border-radius: 24px 24px 0 0;
    min-height: 65vh;
    max-height: 92vh;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -10px 40px rgba(0,0,0,.15);
    animation: obSlideUp .35s cubic-bezier(.16,1,.3,1);
}
@keyframes obSlideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

/* Desktop: centro verticale */
@media (min-width: 600px) {
    #ob-overlay { align-items: center; }
    #ob-modal {
        border-radius: 24px;
        min-height: 500px;
        max-height: 85vh;
    }
}

/* ── BARRA PROGRESSO ── */
#ob-progress-bar {
    height: 4px;
    background: #f0f0f0;
    flex-shrink: 0;
}
#ob-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b4a, #ff8c42);
    transition: width .4s ease;
    width: 0%;
}

/* ── CLOSE ── */
#ob-close {
    position: absolute; top: 14px; right: 16px;
    background: #f0f0f0; border: none; border-radius: 50%;
    width: 32px; height: 32px; font-size: 14px;
    cursor: pointer; z-index: 10; color: #555;
    display: flex; align-items: center; justify-content: center;
}

/* ── CONTENT AREA ── */
#ob-content {
    flex: 1;
    position: relative;
    overflow: hidden;
}

/* ── STEP ── */
.ob-step {
    position: absolute; inset: 0;
    padding: 28px 28px 24px;
    overflow-y: auto;
    display: flex; flex-direction: column;
}

/* Animazioni slide */
.ob-enter-right { transform: translateX(100%); opacity: 0; }
.ob-enter-left  { transform: translateX(-100%); opacity: 0; }
.ob-visible     { transform: translateX(0); opacity: 1; transition: transform .35s cubic-bezier(.16,1,.3,1), opacity .35s ease; }
.ob-exit-right  { transform: translateX(-60%); opacity: 0; transition: transform .3s ease, opacity .3s ease; pointer-events: none; }
.ob-exit-left   { transform: translateX(60%);  opacity: 0; transition: transform .3s ease, opacity .3s ease; pointer-events: none; }

/* ── TIPOGRAFIA ── */
.ob-step h2 { font-size: 22px; margin-bottom: 6px; line-height: 1.2; }
.ob-step p  { color: #666; font-size: 14px; margin-bottom: 4px; line-height: 1.5; }

/* ── CENTRATO (hook / fine) ── */
.ob-center {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    text-align: center; flex: 1;
    padding: 12px 0;
}
.ob-logo { font-size: 64px; margin-bottom: 16px; }
.ob-link { font-size: 13px; color: #aaa; margin-top: 12px; }

/* ── BOTTONI RUOLO ── */
.ob-cards { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.ob-role-card {
    display: flex; align-items: center; gap: 14px;
    background: #f9f9f9; border: 2px solid #eee;
    border-radius: 14px; padding: 16px 18px;
    cursor: pointer; text-align: left;
    transition: .2s;
}
.ob-role-card span     { font-size: 28px; flex-shrink: 0; }
.ob-role-card strong   { display: block; font-size: 15px; }
.ob-role-card small    { color: #888; font-size: 12px; }
.ob-role-card.selected { border-color: #ff6b4a; background: #fff5f3; }
.ob-role-card:active   { transform: scale(.98); }

/* ── GRIGLIA CATEGORIE ── */
.ob-cat-grid {
    display: grid; grid-template-columns: repeat(3,1fr); gap: 10px;
    margin-top: 16px;
}
.ob-cat-btn {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 6px; padding: 16px 8px;
    background: #f9f9f9; border: 2px solid #eee; border-radius: 14px;
    cursor: pointer; font-size: 12px; color: #333; transition: .2s;
}
.ob-cat-btn span   { font-size: 28px; }
.ob-cat-btn.selected { border-color: #ff6b4a; background: #fff5f3; }

/* ── INPUT ── */
.ob-input {
    width: 100%; padding: 14px 16px;
    border: 2px solid #eee; border-radius: 12px;
    font-size: 16px; font-family: inherit;
    outline: none; transition: border .2s;
    display: block; margin-top: 12px;
}
.ob-input:focus { border-color: #ff6b4a; }

/* ── TELEFONO ── */
.ob-phone-row {
    display: flex; align-items: center; gap: 0;
    border: 2px solid #eee; border-radius: 12px;
    margin-top: 12px; overflow: hidden; transition: border .2s;
}
.ob-phone-row:focus-within { border-color: #ff6b4a; }
.ob-prefix {
    padding: 14px 14px; background: #f5f5f5;
    font-size: 15px; white-space: nowrap;
    border-right: 2px solid #eee;
}
.ob-input-phone {
    border: none !important; margin: 0;
    border-radius: 0 !important; flex: 1;
}
.ob-input-phone:focus { outline: none; }

/* ── GEO ── */
.ob-btn-geo {
    background: #fff; border: 2px solid #ff6b4a; color: #ff6b4a;
    border-radius: 12px; padding: 14px; font-size: 15px;
    width: 100%; cursor: pointer; font-weight: 600;
    margin-top: 8px; transition: .2s;
}
.ob-btn-geo:hover { background: #fff5f3; }
.ob-divider {
    text-align: center; color: #bbb; font-size: 13px;
    margin: 14px 0; position: relative;
}
.ob-divider::before, .ob-divider::after {
    content: ''; position: absolute; top: 50%;
    width: 42%; height: 1px; background: #eee;
}
.ob-divider::before { left: 0; }
.ob-divider::after  { right: 0; }

/* ── PULSANTI STEP ── */
.ob-btn {
    width: 100%; padding: 15px;
    border-radius: 12px; border: none;
    font-size: 16px; font-weight: 700;
    cursor: pointer; transition: .2s;
    display: block;
}
.ob-btn-primary {
    background: #ff6b4a; color: #fff;
}
.ob-btn-primary:hover:not(:disabled) { background: #e55a3a; }
.ob-btn-primary:disabled { opacity: .45; cursor: not-allowed; }
.ob-btn-back {
    background: none; color: #aaa; font-weight: 500; font-size: 14px;
    text-align: center;
}
.ob-btn-back:hover { color: #666; }
