/** * Enhanced Modal Styles * Additional styling and animations for modal system */ /* ============================================================================= MODAL ANIMATIONS ============================================================================= */ /* Fade In Animation */ @keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } } /* Slide Down Animation */ @keyframes modalSlideDown { from { transform: translateY(-50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } } /* Slide Up Animation */ @keyframes modalSlideUp { from { transform: translateY(50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } } /* Scale Animation */ @keyframes modalScale { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } } /* Shake Animation for errors */ @keyframes modalShake { 0%, 100% { transform: translateX(0); } 10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); } 20%, 40%, 60%, 80% { transform: translateX(10px); } } /* ============================================================================= MODAL VARIANTS ============================================================================= */ /* Modal with slide down animation */ .modal-container.slide-down { animation: modalSlideDown 0.3s ease-out; } /* Modal with scale animation */ .modal-container.scale { animation: modalScale 0.3s ease-out; } /* Modal with shake animation (for errors) */ .modal-container.shake { animation: modalShake 0.5s ease-in-out; } /* ============================================================================= MODAL SIZES ============================================================================= */ .modal-container.modal-sm { max-width: 400px; } .modal-container.modal-md { max-width: 500px; } .modal-container.modal-lg { max-width: 700px; } .modal-container.modal-xl { max-width: 900px; } .modal-container.modal-full { max-width: 95%; max-height: 95vh; } /* ============================================================================= MODAL THEMES ============================================================================= */ /* Success Modal Theme */ .modal-container.modal-success .modal-header { background-color: #d1fae5; border-bottom-color: #a7f3d0; } .modal-container.modal-success .modal-title { color: #065f46; } /* Error Modal Theme */ .modal-container.modal-error .modal-header { background-color: #fee2e2; border-bottom-color: #fecaca; } .modal-container.modal-error .modal-title { color: #991b1b; } /* Warning Modal Theme */ .modal-container.modal-warning .modal-header { background-color: #fef3c7; border-bottom-color: #fde68a; } .modal-container.modal-warning .modal-title { color: #92400e; } /* Info Modal Theme */ .modal-container.modal-info .modal-header { background-color: #dbeafe; border-bottom-color: #bfdbfe; } .modal-container.modal-info .modal-title { color: #1e40af; } /* ============================================================================= MODAL CONTENT STYLES ============================================================================= */ /* Modal List */ .modal-list { list-style: none; padding: 0; margin: 16px 0; } .modal-list-item { padding: 12px; border-bottom: 1px solid #e5e7eb; display: flex; align-items: center; gap: 12px; } .modal-list-item:last-child { border-bottom: none; } .modal-list-item i { width: 20px; text-align: center; color: #6b7280; } /* Modal Form Elements */ .modal-form-group { margin-bottom: 16px; } .modal-label { display: block; margin-bottom: 8px; font-weight: 500; color: #374151; font-size: 0.95rem; } .modal-input, .modal-textarea, .modal-select { width: 100%; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 0.95rem; transition: all 0.2s; } .modal-input:focus, .modal-textarea:focus, .modal-select:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); } .modal-textarea { min-height: 100px; resize: vertical; } .modal-input.error, .modal-textarea.error, .modal-select.error { border-color: #ef4444; } .modal-error-text { color: #ef4444; font-size: 0.875rem; margin-top: 4px; } .modal-help-text { color: #6b7280; font-size: 0.875rem; margin-top: 4px; } /* ============================================================================= MODAL ALERTS ============================================================================= */ .modal-alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; display: flex; align-items: start; gap: 12px; } .modal-alert i { margin-top: 2px; } .modal-alert.alert-success { background-color: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; } .modal-alert.alert-error { background-color: #fee2e2; color: #991b1b; border: 1px solid #fecaca; } .modal-alert.alert-warning { background-color: #fef3c7; color: #92400e; border: 1px solid #fde68a; } .modal-alert.alert-info { background-color: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; } /* ============================================================================= MODAL PROGRESS ============================================================================= */ .modal-progress { width: 100%; height: 8px; background-color: #e5e7eb; border-radius: 4px; overflow: hidden; margin: 16px 0; } .modal-progress-bar { height: 100%; background-color: #3b82f6; transition: width 0.3s ease; } .modal-progress-bar.success { background-color: #10b981; } .modal-progress-bar.error { background-color: #ef4444; } .modal-progress-bar.warning { background-color: #f59e0b; } /* ============================================================================= LOADING SPINNER VARIANTS ============================================================================= */ .loading-spinner.spinner-sm { width: 32px; height: 32px; border-width: 3px; } .loading-spinner.spinner-lg { width: 64px; height: 64px; border-width: 5px; } .loading-spinner.spinner-success { border-top-color: #10b981; } .loading-spinner.spinner-error { border-top-color: #ef4444; } .loading-spinner.spinner-warning { border-top-color: #f59e0b; } /* ============================================================================= MODAL BACKDROP VARIANTS ============================================================================= */ .modal-backdrop.backdrop-dark { background-color: rgba(0, 0, 0, 0.7); } .modal-backdrop.backdrop-light { background-color: rgba(0, 0, 0, 0.3); } .modal-backdrop.backdrop-blur { backdrop-filter: blur(4px); } /* ============================================================================= RESPONSIVE ENHANCEMENTS ============================================================================= */ @media (max-width: 640px) { .modal-container { width: 100%; max-width: 100%; max-height: 100vh; border-radius: 0; margin: 0; } .modal-header { padding: 16px 20px; } .modal-body { padding: 20px; } .modal-footer { padding: 12px 20px; flex-direction: column-reverse; } .modal-footer .btn { width: 100%; } .modal-alert { flex-direction: column; } } /* ============================================================================= ACCESSIBILITY ============================================================================= */ .modal-backdrop:focus { outline: none; } .modal-container:focus { outline: 2px solid #3b82f6; outline-offset: -2px; } /* Reduce motion for users who prefer it */ @media (prefers-reduced-motion: reduce) { .modal-backdrop, .modal-container, .loading-spinner { animation: none !important; transition: none !important; } } /* High contrast mode support */ @media (prefers-contrast: high) { .modal-container { border: 2px solid currentColor; } .modal-header { border-bottom-width: 2px; } .modal-footer { border-top-width: 2px; } }