/* Prevent dropdown flash during page loads */
.dropdown-menu {
    display: none !important;
}

.dropdown-menu.show {
    display: block !important;
}

/* Add a fade transition for smoother showing/hiding */
.dropdown-menu {
    transition: opacity 0.15s ease-in-out;
    opacity: 0;
}

.dropdown-menu.show {
    opacity: 1;
}

[x-cloak] {
    display: none !important;
}

/* Enhanced Registration Form Styles */
.registration-form {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.form-input-focus {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.password-strength-bar {
    transition: all 0.3s ease;
}

.animate-pulse-slow {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Custom gradient backgrounds */
.bg-gradient-primary {
    background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
}

.bg-gradient-success {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
}

/* Enhanced button hover effects */
.btn-primary-enhanced {
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 2px solid #1E40AF;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.btn-primary-enhanced:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
    background: linear-gradient(135deg, #1D4ED8 0%, #1E40AF 100%);
}

.btn-primary-enhanced:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary-enhanced:disabled {
    background: linear-gradient(135deg, #9CA3AF 0%, #6B7280 100%);
    transform: none;
    box-shadow: none;
    cursor: not-allowed;
}

/* Loading spinner animation */
.spinner {
    animation: spin 1s linear infinite;
}

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

/* Form validation styles */
.input-error {
    border-color: #EF4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.input-success {
    border-color: #10B981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

/* Username availability indicators */
.username-checking {
    animation: pulse 1.5s ease-in-out infinite;
}

.username-available {
    color: #10B981;
}

.username-taken {
    color: #EF4444;
}

/* SweetAlert2 custom styles */
.swal2-popup {
    border-radius: 16px !important;
    font-family: inherit !important;
}

.swal2-title {
    color: #1F2937 !important;
    font-weight: 600 !important;
}

.swal2-html-container {
    color: #4B5563 !important;
}

/* Responsive improvements */
@media (max-width: 640px) {
    .registration-form {
        margin: 0 1rem;
        padding: 1.5rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* iOS-specific mobile menu fixes */
@supports (-webkit-touch-callout: none) {
    /* iOS Safari specific styles */
    .mobile-menu-fix {
        -webkit-overflow-scrolling: touch;
        -webkit-transform: translateZ(0);
    }
    
    /* Ensure proper touch handling on iOS */
    button, a {
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
    
    /* Fix for iOS Safari viewport issues */
    @media screen and (max-width: 640px) {
        body {
            -webkit-text-size-adjust: 100%;
            -ms-text-size-adjust: 100%;
        }
    }
} 