/* Modern Popup Styles */

/* Modal Animations */
.modal.fade .modal-dialog {
    transform: scale(0.8) translateY(-50px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal.show .modal-dialog {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Modern Modal Content */
#modernPopupModal .modal-content {
    border: none;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

/* Dark theme support */
[data-theme="dark"] #modernPopupModal .modal-content {
    background: rgba(45, 50, 65, 0.95);
    color: white;
}

/* Header Styles */
#modernPopupModal .modal-header {
    padding: 1.5rem 1.5rem 0.5rem;
    border: none;
}

#modernPopupModal .modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

/* Body Styles */
#modernPopupModal .modal-body {
    padding: 1rem 1.5rem;
}

#modernPopupModal .modal-body #modernPopupMessage {
    font-size: 1rem;
    line-height: 1.6;
    color: #6b7280;
}

[data-theme="dark"] #modernPopupModal .modal-body #modernPopupMessage {
    color: #d1d5db;
}

/* Input Field */
#modernPopupModal #modernPopupInputField {
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 0.75rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

#modernPopupModal #modernPopupInputField:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

[data-theme="dark"] #modernPopupModal #modernPopupInputField {
    background: rgba(75, 85, 99, 0.8);
    border-color: #4b5563;
    color: white;
}

/* Footer Styles */
#modernPopupModal .modal-footer {
    padding: 0.5rem 1.5rem 1.5rem;
    border: none;
}

/* Button Styles */
#modernPopupModal .btn {
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    min-width: 90px;
}

#modernPopupModal .btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border: 2px solid #3b82f6;
    color: white;
}

#modernPopupModal .btn-primary:hover {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    border-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

#modernPopupModal .btn-outline-secondary {
    background: transparent;
    border: 2px solid #d1d5db;
    color: #6b7280;
}

#modernPopupModal .btn-outline-secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #374151;
}

[data-theme="dark"] #modernPopupModal .btn-outline-secondary {
    border-color: #4b5563;
    color: #d1d5db;
}

[data-theme="dark"] #modernPopupModal .btn-outline-secondary:hover {
    background: rgba(75, 85, 99, 0.5);
    border-color: #6b7280;
}

/* Success/Error/Warning specific styles */
.text-success { color: #059669 !important; }
.text-danger { color: #dc2626 !important; }
.text-warning { color: #d97706 !important; }
.text-info { color: #0284c7 !important; }
.text-primary { color: #3b82f6 !important; }

/* Icon animations */
#modernPopupModal .bi-check-circle-fill,
#modernPopupModal .bi-exclamation-triangle-fill,
#modernPopupModal .bi-question-circle-fill,
#modernPopupModal .bi-info-circle-fill {
    animation: popupIconBounce 0.6s ease-out;
}

#modernPopupModal .spinner-border {
    animation: spin 1s linear infinite;
}

@keyframes popupIconBounce {
    0% { transform: scale(0) rotate(-180deg); }
    50% { transform: scale(1.1) rotate(-10deg); }
    100% { transform: scale(1) rotate(0deg); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Close button styling */
#modernPopupModal .btn-close {
    background: none;
    border: none;
    opacity: 0.5;
    font-size: 1.2rem;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

#modernPopupModal .btn-close:hover {
    opacity: 0.8;
    background: rgba(0, 0, 0, 0.05);
    transform: rotate(90deg);
}

[data-theme="dark"] #modernPopupModal .btn-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Mobile responsiveness */
@media (max-width: 576px) {
    #modernPopupModal .modal-dialog {
        margin: 1rem;
    }
    
    #modernPopupModal .modal-content {
        border-radius: 15px;
    }
    
    #modernPopupModal .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
        min-width: 80px;
    }
    
    #modernPopupModal .modal-header,
    #modernPopupModal .modal-body,
    #modernPopupModal .modal-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Loading state */
#modernPopupModal.loading .modal-footer {
    display: none;
}

#modernPopupModal.loading .btn-close {
    display: none;
}

/* Backdrop blur effect */
.modal-backdrop.show {
    opacity: 0.6;
    backdrop-filter: blur(5px);
}
