/* Custom Themed Popups and Modals */

/* Sweet Alert Style Custom Popup */
.custom-popup-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.75) !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 999999 !important;
    backdrop-filter: blur(3px) !important;
    margin: 0 !important;
    padding: 20px !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

/* Popup Content Styling */
.custom-popup-content {
    color: #333 !important;
    background: #fff !important;
}

.custom-popup-content p {
    color: #333 !important;
    margin-bottom: 12px !important;
}

.custom-popup-content strong {
    color: #1e3a8a !important;
}

.custom-popup-content span {
    color: #333 !important;
}

.custom-popup-overlay.show {
    opacity: 1;
}

.custom-popup {
    background: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3) !important;
    min-width: 400px !important;
    max-width: 600px !important;
    width: 90% !important;
    max-height: 90vh !important;
    padding: 0 !important;
    overflow: hidden !important;
    position: fixed !important;
    z-index: 10000000 !important;
    margin: 0 !important;
    border: 1px solid #e5e7eb !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    transition: opacity 0.3s ease !important;
}

.custom-popup-overlay.show .custom-popup {
    transform: translate(-50%, -50%) !important;
    opacity: 1 !important;
}

.custom-popup-header {
    padding: 20px !important;
    background: #28a745 !important;
    color: white !important;
    border-bottom: 1px solid rgba(0,0,0,0.1) !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    text-align: left !important;
}

.custom-popup-icon {
    display: none !important;
}

.custom-popup-header h5 {
    margin: 0 !important;
    font-size: 1.25rem !important;
    font-weight: 500 !important;
    color: white !important;
}

.custom-popup-close {
    background: none !important;
    border: none !important;
    color: white !important;
    font-size: 1.5rem !important;
    line-height: 1 !important;
    cursor: pointer !important;
    padding: 0 !important;
    opacity: 0.8 !important;
    transition: opacity 0.2s !important;
}

.custom-popup-close:hover {
    opacity: 1 !important;
}

.custom-popup-icon.success {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.custom-popup-icon.error {
    background: linear-gradient(135deg, #dc3545, #e74c3c);
}

.custom-popup-icon.warning {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
}

.custom-popup-icon.info {
    background: linear-gradient(135deg, #17a2b8, #0d6efd);
}

.custom-popup-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #2c3e50;
}

.custom-popup-text {
    font-size: 16px;
    color: #6c757d;
    line-height: 1.5;
    margin: 0;
}

.custom-popup-body {
    padding: 0 30px;
}

.custom-popup-footer {
    padding: 20px 30px 30px 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.custom-popup-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.custom-popup-btn.primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

.custom-popup-btn.primary:hover {
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.4);
}

.custom-popup-btn.success {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.custom-popup-btn.success:hover {
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.custom-popup-btn.danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
}

.custom-popup-btn.danger:hover {
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.4);
}

.custom-popup-btn.secondary {
    background: #f8f9fa;
    color: #6c757d;
    border: 2px solid #e9ecef;
}

.custom-popup-btn.secondary:hover {
    background: #e9ecef;
    color: #495057;
}

/* Notification Toast Styles */
.custom-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 20px;
    max-width: 400px;
    z-index: 10001;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.custom-toast.show {
    transform: translateX(0);
}

.custom-toast.success {
    border-left: 4px solid #28a745;
}

.custom-toast.error {
    border-left: 4px solid #dc3545;
}

.custom-toast.warning {
    border-left: 4px solid #ffc107;
}

.custom-toast.info {
    border-left: 4px solid #17a2b8;
}

.custom-toast-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.custom-toast-icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
}

.custom-toast-title {
    font-weight: 600;
    color: #2c3e50;
    flex: 1;
}

.custom-toast-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #6c757d;
    cursor: pointer;
}

.custom-toast-body {
    color: #6c757d;
    line-height: 1.4;
}

/* Admin Theme Colors */
.admin-theme .custom-popup {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.admin-theme .custom-popup-title {
    color: #495057;
}

.admin-theme .custom-popup-btn.primary {
    background: linear-gradient(135deg, #6c757d, #495057);
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .custom-popup {
        background: #2c3e50;
        color: white;
    }

    .custom-popup-title {
        color: white;
    }

    .custom-popup-text {
        color: #bdc3c7;
    }

    .custom-toast {
        background: #2c3e50;
        color: white;
    }
}

/* Animation classes */
@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.popup-fade-in {
    animation: popupFadeIn 0.3s ease;
}

.toast-slide-in {
    animation: toastSlideIn 0.3s ease;
}
/* Custom Popups CSS */
/* Duplicate styles removed - already defined at the top of the file */

.custom-popup-overlay.show .custom-popup {
    transform: scale(1) !important;
}

/* Enhanced Modal Styling for Success Fee Payments */
.modal-content {
    border-radius: 12px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
    border: none !important;
}

.modal-header.bg-success {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
    border-radius: 12px 12px 0 0 !important;
}

.modal-header.bg-danger {
    background: linear-gradient(135deg, #dc3545, #c82333) !important;
    border-radius: 12px 12px 0 0 !important;
}

.btn-close-red {
    background: #FF0000 !important;
    border-radius: 50% !important;
    width: 32px !important;
    height: 32px !important;
    opacity: 1 !important;
    font-size: 14px !important;
    color: white !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 2px solid white !important;
    box-shadow: 0 2px 8px rgba(255, 0, 0, 0.3) !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
    padding: 0 !important;
}

.btn-close-red:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.5) !important;
    background: #CC0000 !important;
}

.btn-close-red i {
    line-height: 1 !important;
}

/* Enhanced card styling for payment details */
.card.border-primary .card-header {
    background: linear-gradient(135deg, #007bff, #0056b3) !important;
}

.card.border-info .card-header {
    background: linear-gradient(135deg, #17a2b8, #138496) !important;
}

.card.border-warning .card-header {
    background: linear-gradient(135deg, #ffc107, #e0a800) !important;
}

/* Success/Error popup enhancements */
.custom-popup.success-theme {
    border-left: 4px solid #28a745;
}

.custom-popup.error-theme {
    border-left: 4px solid #dc3545;
}

.custom-popup.warning-theme {
    border-left: 4px solid #ffc107;
}

/* Animation for modal show/hide */
.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
    transform: translate(0, -50px);
}

.modal.show .modal-dialog {
    transform: none;
}

/* Enhanced button styling */
.btn-success {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3) !important;
    transition: all 0.2s ease !important;
}

.btn-success:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4) !important;
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545, #c82333) !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3) !important;
    transition: all 0.2s ease !important;
}

.btn-danger:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4) !important;
}

/* Add any missing custom popup styles here */
/* Button styling for custom popups */
.custom-popup-btn {
    padding: 12px 24px !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    min-width: 80px !important;
}

.custom-popup-btn.primary {
    background: #007bff !important;
    color: white !important;
}

.custom-popup-btn.primary:hover {
    background: #0056b3 !important;
}

.custom-popup-btn.secondary {
    background: #6c757d !important;
    color: white !important;
}

.custom-popup-btn.secondary:hover {
    background: #545b62 !important;
}

.custom-popup-btn.danger {
    background: #dc3545 !important;
    color: white !important;
}

.custom-popup-btn.danger:hover {
    background: #c82333 !important;
}

.custom-popup-btn.success {
    background: #28a745 !important;
    color: white !important;
}

.custom-popup-btn.success:hover {
    background: #1e7e34 !important;
}

.custom-popup-btn.warning {
    background: #ffc107 !important;
    color: #212529 !important;
}

.custom-popup-btn.warning:hover {
    background: #e0a800 !important;
}

/* Icon styling */
.custom-popup-icon.success {
    background: #d4edda !important;
    color: #155724 !important;
}

.custom-popup-icon.error {
    background: #f8d7da !important;
    color: #721c24 !important;
}

.custom-popup-icon.warning {
    background: #fff3cd !important;
    color: #856404 !important;
}

.custom-popup-icon.info {
    background: #d1ecf1 !important;
    color: #0c5460 !important;
}

/* Ensure modal appears above everything */
.custom-popup-overlay {
    z-index: 2147483647 !important;
}

body.modal-open {
    overflow: hidden !important;
}

/* Animation classes */
.popup-fade-in {
    animation: popupFadeIn 0.3s ease !important;
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: scale(0.7);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Notification toast styles for better visual feedback */
.custom-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 300px;
    max-width: 450px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    padding: 16px;
    z-index: 10000;
    animation: slideInRight 0.3s ease;
    border-left: 4px solid #3b82f6;
}

.custom-toast-success {
    border-left-color: #10b981;
}

.custom-toast-error {
    border-left-color: #ef4444;
}

.custom-toast-warning {
    border-left-color: #f59e0b;
}

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

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