/* Modern Callback Modal - NEUROSTUFF Style */

/* Backdrop */
.modal.fade .modal-dialog {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.modal.fade:not(.show) .modal-dialog {
    transform: scale(0.9) translateY(-50px);
}

.modal.fade.show .modal-dialog {
    transform: scale(1) translateY(0);
}

/* Modal Content */
#callbackModal .modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: none;
    border-radius: 24px;
    box-shadow: 
        0 25px 50px rgba(99, 102, 241, 0.15),
        0 0 0 1px rgba(99, 102, 241, 0.05);
    backdrop-filter: blur(10px);
    overflow: hidden;
    position: relative;
}

.modal-content.custom-callback::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #6366f1);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 200% 0; }
    50% { background-position: -200% 0; }
}

/* Modal Header */
#callbackModal .modal-header {
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
    padding: 1.5rem 2rem;
    border-radius: 24px 24px 0 0;
    position: relative;
}

.modal-title {
    color: #1e293b !important;
    font-weight: 700;
    font-size: 1.5rem;
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.025em;
}

/* Fallback for browsers that don't support background-clip */
@supports not (-webkit-background-clip: text) {
    .modal-title {
        color: #6366f1 !important;
        background: none !important;
        -webkit-text-fill-color: initial !important;
    }
}

/* Modal Subtitle */
.modal-subtitle {
    color: #64748b !important;
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0.25rem 0 0 0;
    font-family: 'Inter', sans-serif;
}

.btn-close {
    background: rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    opacity: 0.7;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.5rem;
    width: 2.5rem;
    height: 2.5rem;
}

.btn-close:hover {
    background: rgba(99, 102, 241, 0.2);
    opacity: 1;
    transform: scale(1.1);
}

/* Modal Body */
#callbackModal .modal-body {
    padding: 2rem;
    background: #ffffff;
}

/* Form Styles */
#callbackForm .form-label {
    color: #374151;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

#callbackForm .form-control {
    background: #ffffff;
    color: #1f2937;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#callbackForm .form-control:focus {
    border-color: #6366f1;
    background: #ffffff;
    color: #1f2937;
    box-shadow: 
        0 0 0 4px rgba(99, 102, 241, 0.1),
        0 4px 6px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
    outline: none;
}

#callbackForm .form-control:hover:not(:focus) {
    border-color: #d1d5db;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#callbackForm ::placeholder {
    color: #9ca3af;
    opacity: 1;
    font-style: italic;
}

/* Textarea specific */
#callbackForm textarea.form-control {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

/* Modal Footer */
#callbackModal .modal-footer {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-top: 1px solid rgba(99, 102, 241, 0.1);
    padding: 1.5rem 2rem;
    border-radius: 0 0 24px 24px;
    gap: 1rem;
}

/* Primary Button */
.modal-footer .btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
    border: none !important;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 1rem;
    padding: 0.875rem 2rem;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Inter', sans-serif;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
    position: relative;
    overflow: hidden;
}

.modal-footer .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.modal-footer .btn-primary:hover::before {
    left: 100%;
}

.modal-footer .btn-primary:hover, 
.modal-footer .btn-primary:focus {
    background: linear-gradient(135deg, #5855eb, #7c3aed) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.modal-footer .btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

/* Secondary Button */
.modal-footer .btn-secondary {
    background: #ffffff !important;
    border: 2px solid #e5e7eb !important;
    color: #6b7280 !important;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.875rem 2rem;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Inter', sans-serif;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.modal-footer .btn-secondary:hover, 
.modal-footer .btn-secondary:focus {
    background: #f9fafb !important;
    border-color: #6366f1 !important;
    color: #6366f1 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

/* Privacy Policy Link */
.modal-body.custom-callback a {
    color: #6366f1;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.modal-body.custom-callback a:hover {
    color: #5855eb;
    text-decoration: underline;
}

/* Loading State */
.btn-primary.loading {
    position: relative;
    color: transparent !important;
}

.btn-primary.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 576px) {
    .modal-content.custom-callback {
        margin: 1rem;
        border-radius: 20px;
    }
    
    .modal-header.custom-callback,
    .modal-body.custom-callback,
    .modal-footer.custom-callback {
        padding: 1.25rem;
    }
    
    .modal-title.custom-callback {
        font-size: 1.25rem;
    }
    
    .modal-footer.custom-callback {
        flex-direction: column;
    }
    
    .modal-footer.custom-callback .btn {
        width: 100%;
    }
}

/* Success/Error States */
.form-control.is-valid {
    border-color: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.form-control.is-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

/* Animation for modal appearance */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal.show .modal-content.custom-callback {
    animation: modalSlideIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
