/* Unified Modal Design - Consistent across all pages */

/* Modal Backdrop */
.modal-backdrop {
    background: rgba(0, 0, 0, 0.317);
    backdrop-filter: blur(15px);
    z-index: 1054;
}

/* Modal Dialog */
.modal-dialog {
    margin: 1.75rem auto;
    max-width: 500px;
    animation: slideInDown 0.5s ease-out;
}

.modal-dialog-centered {
    display: flex;
    align-items: center;
    min-height: calc(100% - 1rem);
}

/* Modal Content - Unified Design */
.modal-content {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
}

/* Modal Header - Unified Design */
.modal-header {
    border: none;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.9) 0%, rgba(30, 64, 175, 0.8) 100%);
    border-bottom: none;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin: 0;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.9;
    padding: 0.5rem;
    margin: -0.5rem -0.5rem -0.5rem auto;
}

.modal-header .btn-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Modal Body - Unified Design */
.modal-body {
    padding: 1.5rem;
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.95);
}

.modal-body p {
    margin-bottom: 0;
    color: #374151;
    font-size: 1rem;
    line-height: 1.6;
}

/* Modal Footer - Unified Design */
.modal-footer {
    border: none;
    padding: 1rem 1.5rem;
    background: rgba(248, 250, 252, 0.8);
    border-top: 1px solid rgba(226, 232, 240, 0.8);
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.modal-footer .btn {
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.modal-footer .btn-secondary {
    background: #6b7280;
    border-color: #6b7280;
    color: white;
}

.modal-footer .btn-secondary:hover {
    background: #4b5563;
    border-color: #4b5563;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

.modal-footer .btn-danger {
    background: #dc2626;
    border-color: #dc2626;
    color: white;
}

.modal-footer .btn-danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.modal-footer .btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-color: transparent;
    color: white;
}

.modal-footer .btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Animation */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-title {
        font-size: 1.25rem;
    }
    
    .modal-body {
        padding: 1.25rem;
    }
    
    .modal-footer {
        padding: 0.75rem 1rem;
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
}

/* Ensure modal is visible when shown - but don't override search-overlay */
.modal.show:not(.search-overlay) {
    display: block !important;
}

.modal.show:not(.search-overlay) .modal-dialog {
    display: block !important;
}

/* Search Overlay Modal - Keep existing specific styles but inherit base */
/* These styles are defined in search-overlay.css with higher specificity */

