/* Form Handlers Styles for Bazical Data Academy */

/* Contact Form Notifications */
.contact-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.3s ease-out;
}

.contact-notification.success {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.contact-notification.error {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
}

.notification-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification-content i {
    font-size: 24px;
    margin-bottom: 5px;
}

.notification-content h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.notification-content p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

.notification-content button {
    align-self: flex-end;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s;
}

.notification-content button:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Moodle Login Modal */
.moodle-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-out;
}

.moodle-modal {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideInUp 0.3s ease-out;
}

.moodle-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.moodle-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.moodle-modal-header h3 i {
    margin-right: 10px;
}

.moodle-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.moodle-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.moodle-modal-body {
    padding: 30px;
}

.login-options {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 30px;
    align-items: center;
    margin-bottom: 30px;
}

.login-option {
    text-align: center;
    padding: 20px;
    border: 2px solid #f0f0f0;
    border-radius: 8px;
    transition: border-color 0.2s;
}

.login-option:hover {
    border-color: #667eea;
}

.login-option h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 18px;
}

.login-option p {
    margin: 0 0 20px 0;
    color: #666;
    font-size: 14px;
}

.login-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.login-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 60px;
    background: #e0e0e0;
}

.login-divider span {
    background: white;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    color: #666;
    font-weight: 600;
    z-index: 1;
    position: relative;
}

.moodle-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.moodle-info h5 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

.moodle-info h5 i {
    margin-right: 8px;
    color: #667eea;
}

.moodle-info ul {
    margin: 0;
    padding-left: 20px;
}

.moodle-info li {
    margin-bottom: 8px;
    color: #555;
    font-size: 14px;
}

.moodle-support {
    text-align: center;
    padding: 20px;
    background: #fff3cd;
    border-radius: 8px;
    border: 1px solid #ffeaa7;
}

.moodle-support p {
    margin: 5px 0;
    font-size: 14px;
}

.moodle-support a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.moodle-support a:hover {
    text-decoration: underline;
}

/* Payment Error Notifications */
.payment-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10001;
    max-width: 500px;
    width: 90%;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideInUp 0.3s ease-out;
}

.payment-notification.error {
    background: white;
    border: 2px solid #f44336;
}

.payment-notification .notification-content {
    padding: 30px;
    text-align: center;
}

.payment-notification .notification-content i {
    font-size: 48px;
    color: #f44336;
    margin-bottom: 15px;
}

.payment-notification .notification-content h4 {
    color: #333;
    font-size: 20px;
    margin-bottom: 10px;
}

.payment-notification .notification-content p {
    color: #666;
    font-size: 16px;
    margin-bottom: 20px;
}

.error-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.error-actions button {
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.error-actions button:first-child {
    background: #f5f5f5;
    border: 1px solid #ddd;
    color: #666;
}

.error-actions button:first-child:hover {
    background: #e9e9e9;
}

.error-actions button:last-child {
    background: #667eea;
    border: 1px solid #667eea;
    color: white;
}

.error-actions button:last-child:hover {
    background: #5a6fd8;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        transform: translate(-50%, -40%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .contact-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .moodle-modal {
        width: 95%;
        margin: 20px;
    }
    
    .moodle-modal-body {
        padding: 20px;
    }
    
    .login-options {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .login-divider {
        order: 2;
    }
    
    .login-divider::before {
        width: 60px;
        height: 2px;
    }
    
    .payment-notification {
        width: 95%;
        margin: 20px;
    }
    
    .error-actions {
        flex-direction: column;
    }
    
    .error-actions button {
        width: 100%;
    }
}

/* Loading States */
.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.btn .fa-spinner {
    animation: spin 1s linear infinite;
}

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