/**
 * SmartWeb Onboarding V2 Styles
 * 
 * Additional styles for onboarding
 */

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(124, 58, 237, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(124, 58, 237, 0);
    }
}

/* Enhanced Form Styles */
.form-group {
    animation: slideIn 0.3s ease-out;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }
.form-group:nth-child(5) { animation-delay: 0.5s; }

/* Enhanced Preview Cards */
.preview-card {
    opacity: 0;
    animation: slideIn 0.5s ease-out forwards;
}

.preview-card:nth-child(1) { animation-delay: 0.1s; }
.preview-card:nth-child(2) { animation-delay: 0.2s; }
.preview-card:nth-child(3) { animation-delay: 0.3s; }

.preview-card.selected {
    animation: pulse 2s infinite;
}

/* Enhanced Plan Cards */
.plan-card {
    position: relative;
    overflow: hidden;
}

.plan-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(124, 58, 237, 0.1), transparent);
    transform: rotate(45deg);
    transition: transform 0.6s;
    opacity: 0;
}

.plan-card:hover::before {
    transform: rotate(45deg) translate(50%, 50%);
    opacity: 1;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .step-title {
        font-size: 1.5rem;
    }
    
    .step-description {
        font-size: 1rem;
    }
    
    #step-1 > div {
        grid-template-columns: 1fr !important;
    }
    
    .plan-price {
        font-size: 2rem;
    }
}

/* Success State */
.success-checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto;
}

.success-checkmark svg {
    width: 100%;
    height: 100%;
}

/* Plan cards styling */
.plan-card {
    position: relative;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.plan-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
}

.plan-card.selected {
    border-color: #7c3aed !important;
    background: #f3f0ff !important;
    transform: scale(1.02) !important;
}

.popular-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background: #f59e0b;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: bold;
}

.setup-fee {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

/* Payment form styling */
.payment-method-option {
    transition: all 0.2s ease;
}

.payment-method-option:hover {
    border-color: #7c3aed !important;
    background: #f9f5ff !important;
}

.payment-method-option:has(input:checked) {
    border-color: #7c3aed !important;
    background: #f3f0ff !important;
}

#card-payment-form input {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 1rem;
}

#card-payment-form input:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #10b981;
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: #fff;
    stroke-miterlimit: 10;
    box-shadow: inset 0px 0px 0px #10b981;
    animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}

.checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes scale {
    0%, 100% {
        transform: none;
    }
    50% {
        transform: scale3d(1.1, 1.1, 1);
    }
}

@keyframes fill {
    100% {
        box-shadow: inset 0px 0px 0px 30px #10b981;
    }
}

/* Loading States */
.loading-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Tooltip */
.tooltip {
    position: relative;
}

.tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 4px;
    font-size: 0.875rem;
    white-space: nowrap;
    margin-bottom: 0.5rem;
}

/* Error States */
.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: var(--error-color);
}

.form-group.error .error-message {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Focus States */
.btn:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    body {
        background: #1a1a1a;
        color: #e0e0e0;
    }
    
    .onboarding-header,
    .progress-container,
    .preview-card,
    .plan-card {
        background: #2a2a2a;
        color: #e0e0e0;
    }
    
    input,
    select,
    textarea {
        background: #3a3a3a;
        border-color: #4a4a4a;
        color: #e0e0e0;
    }
}