/* Modal Auth Styles - Complete Redesign */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 0;
    box-sizing: border-box;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-container {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 
        0 32px 64px rgba(0, 0, 0, 0.12),
        0 16px 32px rgba(91, 0, 170, 0.08);
    border: 1px solid rgba(91, 0, 170, 0.12);
    width: 100%;
    max-width: 600px;
    height: auto;
    max-height: 90vh;
    overflow: auto;
    position: relative;
    transform: scale(0.95) translateY(0);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
}

.modal-overlay.active .modal-container {
    transform: scale(1) translateY(0);
}

.modal-iframe {
    width: 100%;
    height: auto;
    max-height: 90vh;
    border: none;
    border-radius: 24px;
    background: #ffffff;
    overflow: hidden;
    display: block;
}

/* Modal Auth Page Styles - Complete Redesign */
.modal-auth-container {
    padding: 0;
    margin: 0;
    background: #ffffff;
    height: auto;
    max-height: none;
    display: flex;
    flex-direction: column;
    font-family: 'Urbanist', sans-serif;
    overflow: visible;
    box-sizing: border-box;
}

.modal-auth-body {
    flex: 1 0 auto;
    padding: 40px 32px 24px 32px;
    background: transparent;
    overflow: visible;
    box-sizing: border-box;
    min-height: 0;
}

.block-content {
    padding: 32px;
    flex: 1;
}

.modal-auth-form {
    margin-bottom: 20px;
}

/* Password strength meter */
.password-strength {
    margin-top: 8px;
}
.password-strength-bar {
    height: 8px;
    width: 0;
    background: #ef4444;
    border-radius: 6px;
    transition: width 0.25s ease, background 0.25s ease;
}
.password-strength-text {
    margin-top: 6px;
    font-size: 12px;
    color: #6b7280;
}
.password-weak .password-strength-bar { width: 33%; background: #ef4444; }
.password-medium .password-strength-bar { width: 66%; background: #f59e0b; }
.password-strong .password-strength-bar { width: 100%; background: #10b981; }

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-family: 'Urbanist', sans-serif;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    font-size: 15px;
    font-family: 'Urbanist', sans-serif;
    transition: all 0.2s ease;
    background: #ffffff;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #5b00aa;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(91, 0, 170, 0.1);
}

.form-group input::placeholder {
    color: #9ca3af;
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    margin: 0;
    font-family: 'Urbanist', sans-serif;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    margin-right: 8px;
    position: relative;
    transition: all 0.2s ease;
    background: #ffffff;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #5b00aa;
    border-color: #5b00aa;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.forgot-password {
    font-size: 14px;
    color: #5b00aa;
    text-decoration: none;
    font-weight: 600;
    font-family: 'Urbanist', sans-serif;
    transition: all 0.2s ease;
}

.forgot-password:hover {
    text-decoration: underline;
    color: #4a0088;
}

.modal-auth-btn {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #5b00aa 0%, #7B3FA7 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Urbanist', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(91, 0, 170, 0.2);
}

.modal-auth-btn:hover {
    background: linear-gradient(135deg, #4a0088 0%, #6a3196 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(91, 0, 170, 0.3);
}

.modal-auth-btn:active {
    transform: translateY(0);
}

.modal-auth-divider {
    text-align: center;
    margin: 24px 0;
    position: relative;
}

.modal-auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e5e7eb;
}

.modal-auth-divider span {
    background: #ffffff;
    padding: 0 16px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Urbanist', sans-serif;
    position: relative;
}

.modal-auth-social {
    display: flex;
    flex-direction: row;
    gap: 8px;
    margin-bottom: 32px;
    justify-content: space-between;
    align-items: stretch;
}

.modal-auth-social.vertical {
    flex-direction: row;
    gap: 8px;
    justify-content: space-between;
}

.social-btn {
    flex: 1;
    padding: 16px 8px;
    border: none;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Urbanist', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 0;
    width: 100%;
    height: 80px;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.social-btn i {
    font-size: 24px;
    color: white;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.modal-auth-social.vertical .social-btn {
    flex: 1;
    padding: 16px 8px;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    min-width: 0;
    height: 80px;
}


.google-btn {
    background: linear-gradient(135deg, #db4437 0%, #c23321 100%);
}

.google-btn:hover {
    background: linear-gradient(135deg, #c23321 0%, #a82d1b 100%);
}

.yandex-btn {
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
}

.yandex-btn:hover {
    background: linear-gradient(135deg, #cc0000 0%, #990000 100%);
}

.apple-btn {
    background: linear-gradient(135deg, #000000 0%, #333333 100%);
}

.apple-btn:hover {
    background: linear-gradient(135deg, #333333 0%, #1a1a1a 100%);
}

.microsoft-btn {
    background: linear-gradient(135deg, #00a4ef 0%, #0078d4 100%);
}

.microsoft-btn:hover {
    background: linear-gradient(135deg, #0078d4 0%, #106ebe 100%);
}

.facebook-btn {
    background: linear-gradient(135deg, #4267b2 0%, #365899 100%);
}

.facebook-btn:hover {
    background: linear-gradient(135deg, #365899 0%, #29487d 100%);
}

.modal-auth-footer {
    text-align: center;
    margin-top: 16px;
    padding: 0;
}

.modal-auth-footer p {
    margin: 0;
    font-size: 15px;
    color: #374151;
    font-family: 'Urbanist', sans-serif;
}

.auth-link {
    color: #5b00aa;
    text-decoration: none;
    font-weight: 600;
    font-family: 'Urbanist', sans-serif;
    transition: all 0.2s ease;
}

.auth-link:hover {
    text-decoration: underline;
    color: #4a0088;
}

/* reCAPTCHA Container */
.recaptcha-container { margin: 0; display: none !important; }

.recaptcha-container .g-recaptcha { display: none !important; }

/* Form Row Layout */
.form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* Textarea Styling */
textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    font-size: 15px;
    font-family: 'Urbanist', sans-serif;
    transition: all 0.2s ease;
    background: #ffffff;
    box-sizing: border-box;
    resize: vertical;
    min-height: 80px;
}

textarea:focus {
    outline: none;
    border-color: #5b00aa;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(91, 0, 170, 0.1);
}

textarea::placeholder {
    color: #9ca3af;
}

/* File Upload Styling */
.file-upload-container {
    position: relative;
}

.file-input {
    display: none;
}

.file-upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 16px;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    background: #f9fafb;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 15px;
    font-family: 'Urbanist', sans-serif;
    color: #6b7280;
}

.file-upload-label:hover {
    border-color: #5b00aa;
    background: rgba(91, 0, 170, 0.05);
    color: #5b00aa;
}

.file-preview {
    margin-top: 8px;
    padding: 8px;
    border-radius: 8px;
    background: #f3f4f6;
    display: none;
}

.file-preview img {
    max-width: 60px;
    max-height: 60px;
    border-radius: 8px;
    object-fit: cover;
}

.file-preview.show {
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-info {
    flex: 1;
}

.file-name {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 2px;
}

.file-size {
    font-size: 12px;
    color: #6b7280;
}

.remove-file {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.remove-file:hover {
    background: #dc2626;
}

/* Legal Documents Styling */
.legal-documents {
    margin: 16px 0;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.legal-documents h4 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    font-family: 'Urbanist', sans-serif;
}

.legal-documents .form-options {
    margin-bottom: 12px;
}

.legal-documents .checkbox-label {
    font-size: 13px;
    line-height: 1.4;
}

.legal-documents a {
    color: #5b00aa;
    text-decoration: none;
    font-weight: 600;
}

.legal-documents a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-overlay {
        padding: 0;
    }
    
    .modal-container {
        width: 100%;
        max-width: none;
        height: auto;
        max-height: 90vh;
    }
    
    .modal-iframe {
        height: auto;
        max-height: 90vh;
    }
    
    .modal-auth-body {
        padding: 32px 20px 16px 20px;
        overflow: visible;
    }
    
    .modal-auth-title {
        font-size: 26px;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .form-group input {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .modal-auth-btn {
        padding: 14px 20px;
        font-size: 15px;
    }
    
    .modal-auth-social {
        flex-direction: row;
        gap: 6px;
        justify-content: space-between;
    }
    
    .modal-auth-social .social-btn {
        flex: 1;
        padding: 12px 4px;
        flex-direction: column;
        gap: 4px;
        font-size: 10px;
        min-width: 0;
        height: 70px;
    }
    
    .modal-auth-social .social-btn i {
        font-size: 18px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-row .form-group {
        margin-bottom: 16px;
    }
    
    .legal-documents {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .modal-overlay {
        padding: 0;
    }
    
    .modal-container {
        height: auto;
        max-height: 90vh;
    }
    
    .modal-iframe {
        height: auto;
        max-height: 90vh;
    }
    
    .modal-auth-body {
        padding: 28px 16px 12px 16px;
        overflow: visible;
    }
    
    .modal-auth-title {
        font-size: 24px;
    }
    
    .modal-auth-social {
        flex-direction: row;
        gap: 4px;
        justify-content: space-between;
    }
    
    .modal-auth-social .social-btn {
        flex: 1;
        padding: 10px 2px;
        flex-direction: column;
        gap: 3px;
        font-size: 9px;
        min-width: 0;
        height: 65px;
    }
    
    .modal-auth-social .social-btn i {
        font-size: 16px;
    }
    
    .modal-auth-social .social-btn span {
        font-size: 9px;
        line-height: 1.1;
    }
}

/* Toast Notification Styles */
.toast-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
    min-width: 320px;
    max-width: 500px;
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-left: 5px solid #ef4444;
    backdrop-filter: blur(10px);
}

.toast-notification.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    animation: toastPulse 0.5s ease;
}

.toast-notification.success {
    border-left-color: #10b981;
}

.toast-notification.warning {
    border-left-color: #f59e0b;
}

.toast-notification.info {
    border-left-color: #3b82f6;
}

.toast-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.toast-notification .toast-icon {
    background: #fee2e2;
    color: #ef4444;
}

.toast-notification.success .toast-icon {
    background: #d1fae5;
    color: #10b981;
}

.toast-notification.warning .toast-icon {
    background: #fef3c7;
    color: #f59e0b;
}

.toast-notification.info .toast-icon {
    background: #dbeafe;
    color: #3b82f6;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
    font-family: 'Urbanist', sans-serif;
}

.toast-message {
    font-size: 16px;
    color: #1f2937;
    line-height: 1.5;
    font-family: 'Urbanist', sans-serif;
    font-weight: 500;
}

@keyframes toastPulse {
    0% {
        transform: translate(-50%, -50%) scale(0.9);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05);
        box-shadow: 0 16px 64px rgba(0, 0, 0, 0.3);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 12px 48px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
    }
}

.toast-close {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s ease;
}

.toast-close:hover {
    background: #f3f4f6;
    color: #6b7280;
}

@media (max-width: 768px) {
    .toast-notification {
        top: 50%;
        left: 50%;
        right: auto;
        min-width: 280px;
        max-width: calc(100vw - 40px);
        padding: 18px 20px;
    }
}