/**
 * First-Time User Onboarding Modal Styles
 */

.onboarding-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20000;
    align-items: center;
    justify-content: center;
}

.onboarding-modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.onboarding-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.onboarding-container {
    position: relative;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 480px;
    width: calc(100% - 32px);
    max-height: calc(100vh - 48px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.onboarding-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 100;
    font-size: 0.75rem;
}

.onboarding-close:hover {
    background: rgba(255, 255, 255, 0.4);
    color: white;
    transform: scale(1.1);
}

/* Step Indicator */
.onboarding-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 24px 48px 12px 24px;
    background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
    position: relative;
}

/* Progress Bar */
.onboarding-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
}

.onboarding-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #86efac);
    width: 25%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.onboarding-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.onboarding-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.onboarding-step span {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.onboarding-step.active span,
.onboarding-step.completed span {
    color: white;
}

.step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.6);
    font-weight: 700;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.onboarding-step.active .step-dot {
    background: white;
    color: #4f46e5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: scale(1.1);
}

.onboarding-step.completed .step-dot {
    background: #22c55e;
    color: white;
}

.step-connector {
    width: 40px;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 8px 22px;
    border-radius: 1px;
    transition: background 0.3s;
}

.onboarding-step.completed+.step-connector {
    background: rgba(255, 255, 255, 0.6);
}

/* Slide Content */
.onboarding-content {
    flex: 1;
    overflow-y: auto;
    padding: 32px 24px;
}

.onboarding-slide {
    display: none;
    text-align: center;
    animation: fadeSlide 0.4s ease;
}

.onboarding-slide.active {
    display: block;
}

@keyframes fadeSlide {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.onboarding-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    color: #4f46e5;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    position: relative;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.onboarding-icon::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c7d2fe, #e0e7ff);
    z-index: -1;
    opacity: 0.5;
    animation: pulse-ring 2s ease-out infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }

    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

.onboarding-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.onboarding-icon.notification-icon {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #d97706;
}

.onboarding-icon.location-icon {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #16a34a;
}

.onboarding-icon.success-icon {
    background: linear-gradient(135deg, #dcfce7 0%, #86efac 100%);
    color: #16a34a;
    animation: pulse 1.5s ease infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.onboarding-slide h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
}

/* Typing animation for welcome text */
.typing-text {
    overflow: hidden;
    white-space: nowrap;
    animation: typing 1s steps(30) forwards;
}

@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

.onboarding-desc {
    font-size: 1rem;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 24px;
}

/* Features List */
.onboarding-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f8fafc;
    padding: 16px;
    border-radius: 12px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    transition: all 0.3s;
    border-radius: 8px;
    opacity: 0;
    transform: translateX(-20px);
    animation: slide-in 0.4s ease forwards;
}

.feature-item:nth-child(1) {
    animation-delay: 0.1s;
}

.feature-item:nth-child(2) {
    animation-delay: 0.2s;
}

.feature-item:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes slide-in {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.feature-item:hover {
    background: rgba(79, 70, 229, 0.05);
    transform: translateX(4px);
}

.feature-item i {
    width: 36px;
    height: 36px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4f46e5;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.feature-item span {
    font-weight: 500;
    color: #1e293b;
}

/* Options/Toggles */
.onboarding-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.onboarding-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    transition: all 0.2s;
    border: 1px solid #e2e8f0;
}

.onboarding-option:hover {
    border-color: #4f46e5;
    background: #f8fafc;
}

.option-info {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}

.option-icon {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4f46e5;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.option-info strong {
    display: block;
    font-size: 0.95rem;
    color: #1e293b;
}

.option-info small {
    font-size: 0.8rem;
    color: #64748b;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 28px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-switch input:checked+.toggle-slider {
    background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
}

.toggle-switch input:checked+.toggle-slider:before {
    transform: translateX(24px);
}

/* Location Preview */
.location-preview {
    margin-bottom: 20px;
}

.location-preview-map {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #0284c7;
    position: relative;
    overflow: hidden;
}

.location-preview-map::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, transparent 30%, rgba(2, 132, 199, 0.1) 70%);
    animation: radar 2s ease infinite;
}

@keyframes radar {
    0% {
        transform: scale(0.5);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 0;
    }
}

.onboarding-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.onboarding-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(22, 163, 74, 0.4);
}

.onboarding-action-btn.success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    pointer-events: none;
}

.onboarding-action-btn.success i {
    animation: checkmark 0.3s ease;
}

@keyframes checkmark {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.onboarding-note {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.onboarding-note i {
    color: #4f46e5;
}

.onboarding-note.success {
    color: #16a34a;
}

.onboarding-note.success i {
    color: #16a34a;
}

/* Quick Start Actions */
.quick-start-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.quick-start-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-start-btn:hover {
    border-color: #4f46e5;
    background: #eff6ff;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.15);
}

.quick-start-btn:active {
    transform: translateY(-2px);
}

.quick-start-btn i {
    font-size: 1.5rem;
    color: #4f46e5;
}

.quick-start-btn span {
    font-size: 0.75rem;
    font-weight: 600;
    color: #1e293b;
    text-align: center;
}

.settings-reminder {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-radius: 8px;
    font-size: 0.85rem;
    color: #166534;
}

.settings-reminder i {
    color: #22c55e;
}

/* Navigation */
.onboarding-nav {
    display: flex;
    justify-content: space-between;
    padding: 16px 24px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.onboarding-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.onboarding-btn.primary {
    background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.onboarding-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4);
}

.onboarding-btn.secondary {
    background: white;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.onboarding-btn.secondary:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.onboarding-skip {
    display: block;
    margin: 0 auto 16px;
    padding: 8px 16px;
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 0.85rem;
    cursor: pointer;
    transition: color 0.2s;
}

.onboarding-skip:hover {
    color: #64748b;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 480px) {
    .onboarding-container {
        width: calc(100% - 24px);
        max-height: calc(100vh - 32px);
    }

    .onboarding-steps {
        padding: 20px 48px 12px 16px;
    }

    .step-dot {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }

    .step-connector {
        width: 24px;
        margin: 0 4px 22px;
    }

    .onboarding-step span {
        font-size: 0.6rem;
    }

    .onboarding-content {
        padding: 24px 16px;
    }

    .onboarding-slide h2 {
        font-size: 1.25rem;
    }

    .quick-start-actions {
        grid-template-columns: 1fr;
    }

    .quick-start-btn {
        flex-direction: row;
        padding: 12px 16px;
    }

    .onboarding-nav {
        padding: 12px 16px;
    }

    .onboarding-btn {
        padding: 10px 16px;
        font-size: 0.875rem;
    }
}