/**
 * Onboarding Wizard Styles
 * First-time user setup flow for Family Calendar Dashboard.
 */

/* ============================================================
   Onboarding Overlay
   ============================================================ */
#onboarding-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: 'Outfit', sans-serif;

    /* Animated gradient background */
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    background-size: 400% 400%;
    animation: ob-gradient 12s ease infinite;
    overflow: auto;
}

#onboarding-overlay.ob-hidden {
    display: none;
}

@keyframes ob-gradient {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ============================================================
   Floating particles (decorative)
   ============================================================ */
.ob-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    animation: ob-float linear infinite;
    pointer-events: none;
}

@keyframes ob-float {
    0%   { transform: translateY(100vh) scale(0); opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

/* ============================================================
   Card
   ============================================================ */
.ob-card {
    position: relative;
    width: 100%;
    max-width: 540px;
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 28px;
    padding: 48px 44px 40px;
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    color: #fff;
    animation: ob-card-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes ob-card-in {
    from { opacity: 0; transform: translateY(30px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============================================================
   Progress dots
   ============================================================ */
.ob-progress {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 36px;
}

.ob-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.ob-dot.active {
    background: #fff;
    width: 24px;
    border-radius: 4px;
    box-shadow: 0 0 8px rgba(255,255,255,0.5);
}

.ob-dot.done {
    background: rgba(255, 255, 255, 0.5);
}

/* ============================================================
   Step content
   ============================================================ */
.ob-step {
    display: none;
    animation: ob-step-in 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.ob-step.active {
    display: block;
}

@keyframes ob-step-in {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}

.ob-step-out {
    animation: ob-step-out 0.25s ease forwards;
}

@keyframes ob-step-out {
    to { opacity: 0; transform: translateX(-20px); }
}

/* ============================================================
   Emoji + Badge
   ============================================================ */
.ob-emoji {
    font-size: 52px;
    display: block;
    text-align: center;
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
    animation: ob-bounce 2s ease-in-out infinite;
}

@keyframes ob-bounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-6px); }
}

/* ============================================================
   Typography
   ============================================================ */
.ob-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin: 0 0 10px;
    line-height: 1.1;
    background: linear-gradient(135deg, #fff 40%, rgba(255,255,255,0.6));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ob-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    margin: 0 0 32px;
    line-height: 1.5;
}

.ob-section-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    margin-bottom: 10px;
    display: block;
}

/* ============================================================
   Inputs
   ============================================================ */
.ob-input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    color: #fff;
    font-size: 1rem;
    font-family: 'Outfit', sans-serif;
    outline: none;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.ob-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.ob-input:focus {
    border-color: rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.12);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.08);
}

.ob-input-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.ob-input-row .ob-input {
    flex: 1;
}

/* ============================================================
   Buttons
   ============================================================ */
.ob-btn-primary {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    border: none;
    border-radius: 14px;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 10px;
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
    box-shadow: 0 4px 20px rgba(124,58,237,0.5);
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ob-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 28px rgba(124,58,237,0.7);
}

.ob-btn-primary:active {
    transform: scale(0.98);
}

.ob-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.ob-btn-secondary {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    color: rgba(255,255,255,0.7);
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    padding: 10px 18px;
    cursor: pointer;
    transition: all 0.2s;
}

.ob-btn-secondary:hover {
    background: rgba(255,255,255,0.14);
    color: #fff;
}

.ob-btn-skip {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 14px;
    color: rgba(255,255,255,0.35);
    font-size: 0.85rem;
    cursor: pointer;
    background: none;
    border: none;
    font-family: 'Outfit', sans-serif;
    transition: color 0.2s;
    padding: 4px;
}

.ob-btn-skip:hover {
    color: rgba(255,255,255,0.65);
}

/* Google Sign-in button */
.ob-btn-google {
    width: 100%;
    padding: 16px;
    background: #fff;
    border: none;
    border-radius: 14px;
    color: #202124;
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 10px;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.ob-btn-google:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 28px rgba(0,0,0,0.4);
}

.ob-btn-google:active {
    transform: scale(0.98);
}

.ob-btn-google svg {
    flex-shrink: 0;
}

/* ============================================================
   Family member list in onboarding
   ============================================================ */
.ob-member-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
    max-height: 220px;
    overflow-y: auto;
    padding-right: 2px;
}

.ob-member-list::-webkit-scrollbar {
    width: 4px;
}

.ob-member-list::-webkit-scrollbar-track {
    background: transparent;
}

.ob-member-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
}

.ob-member-row {
    display: flex;
    gap: 8px;
    align-items: center;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 10px 12px;
    transition: background 0.2s;
    animation: ob-step-in 0.3s ease;
}

.ob-member-row:hover {
    background: rgba(255,255,255,0.09);
}

.ob-member-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    font-weight: 600;
    color: #fff;
}

.ob-member-fields {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.ob-member-name-input {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 2px 4px;
    width: 100%;
    outline: none;
}

.ob-member-name-input::placeholder { color: rgba(255,255,255,0.35); }
.ob-member-name-input:focus { border-bottom-color: rgba(255,255,255,0.6); }

.ob-member-role-input {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.55);
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    padding: 1px 4px;
    width: 100%;
    outline: none;
}

.ob-member-role-input::placeholder { color: rgba(255,255,255,0.25); }

.ob-remove-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.3);
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
    line-height: 1;
    flex-shrink: 0;
    transition: color 0.2s;
}

.ob-remove-btn:hover { color: rgba(255, 100, 100, 0.8); }

.ob-add-member-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.05);
    border: 1px dashed rgba(255,255,255,0.2);
    border-radius: 12px;
    color: rgba(255,255,255,0.5);
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    padding: 10px 16px;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s;
    margin-bottom: 14px;
}

.ob-add-member-btn:hover {
    background: rgba(255,255,255,0.09);
    border-color: rgba(255,255,255,0.35);
    color: rgba(255,255,255,0.8);
}

/* ============================================================
   Calendar list
   ============================================================ */
.ob-calendar-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
    max-height: 240px;
    overflow-y: auto;
    padding-right: 2px;
}

.ob-calendar-list::-webkit-scrollbar {
    width: 4px;
}
.ob-calendar-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
}

.ob-cal-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 12px 14px;
    cursor: pointer;
    transition: all 0.2s;
    animation: ob-step-in 0.3s ease;
}

.ob-cal-item:hover {
    background: rgba(255,255,255,0.1);
}

.ob-cal-item.selected {
    background: rgba(124,58,237,0.25);
    border-color: rgba(124,58,237,0.5);
}

.ob-cal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ob-cal-name {
    flex: 1;
    font-size: 0.95rem;
    color: rgba(255,255,255,0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ob-cal-check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
    font-size: 11px;
}

.ob-cal-item.selected .ob-cal-check {
    background: #7c3aed;
    border-color: #7c3aed;
}

.ob-cal-loading {
    text-align: center;
    color: rgba(255,255,255,0.4);
    font-size: 0.9rem;
    padding: 20px;
}

/* ============================================================
   Location chip suggestions
   ============================================================ */
.ob-location-hint {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
    margin-top: 8px;
    text-align: center;
}

/* ============================================================
   Success / completion step
   ============================================================ */
.ob-success-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 24px 0;
}

.ob-success-item {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    padding: 16px;
    text-align: center;
}

.ob-success-item .ob-si-icon {
    font-size: 24px;
    margin-bottom: 6px;
}

.ob-success-item .ob-si-label {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    display: block;
}

.ob-success-item .ob-si-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    display: block;
    margin-top: 2px;
}

/* Confetti burst */
.ob-confetti {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    border-radius: 28px;
}

.ob-confetti-piece {
    position: absolute;
    top: -10px;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    animation: ob-confetti-fall 2s ease-out forwards;
}

@keyframes ob-confetti-fall {
    0%   { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(300px) rotate(720deg); opacity: 0; }
}

/* ============================================================
   Navigation row
   ============================================================ */
.ob-nav {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    align-items: center;
}

.ob-nav .ob-btn-back {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    color: rgba(255,255,255,0.55);
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    padding: 14px 20px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.ob-nav .ob-btn-back:hover {
    background: rgba(255,255,255,0.13);
    color: #fff;
}

.ob-nav .ob-btn-primary {
    flex: 1;
    margin-top: 0;
}

/* ============================================================
   Divider
   ============================================================ */
.ob-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: rgba(255,255,255,0.2);
    font-size: 0.8rem;
}

.ob-divider::before,
.ob-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.1);
}

/* ============================================================
   Feature list (welcome step)
   ============================================================ */
.ob-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 24px 0 28px;
}

.ob-feature {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    color: rgba(255,255,255,0.8);
    font-size: 0.95rem;
    transition: background 0.2s;
}

.ob-feature:hover {
    background: rgba(255,255,255,0.09);
}

.ob-feature-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.ob-feature-text strong {
    display: block;
    color: #fff;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.ob-feature-text span {
    color: rgba(255,255,255,0.5);
    font-size: 0.8rem;
}

/* ============================================================
   Responsive tweaks
   ============================================================ */
@media (max-width: 560px) {
    .ob-card {
        padding: 36px 24px 28px;
        border-radius: 20px;
    }

    .ob-title {
        font-size: 1.65rem;
    }

    .ob-success-grid {
        grid-template-columns: 1fr;
    }
}
