/* Global Styles for FreeDoctor Application */

/* Include back arrow styles */
@import url('back-arrow.css');

/* General body styling for dashboard pages */
body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Alert styles */
.alert {
    border-radius: 8px;
    margin-bottom: 1rem;
}

/* Button styles */
.btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Form control styles */
.form-control {
    border-radius: 6px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #5a4de8;
    box-shadow: 0 0 0 0.2rem rgba(90, 77, 232, 0.25);
}

/* Modal improvements */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.modal-header {
    border-bottom: 1px solid #f0f0f0;
    border-radius: 12px 12px 0 0;
}

.modal-footer {
    border-top: 1px solid #f0f0f0;
    border-radius: 0 0 12px 12px;
}

/* Table improvements */
.table {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.table th {
    background-color: #f8f9fa;
    border: none;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.table td {
    border: none;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    padding: 1rem 0.75rem;
}

/* Badge improvements */
.badge {
    border-radius: 20px;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Card improvements */
.card {
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* Utility classes */
.shadow-soft {
    box-shadow: 0 4px 6px rgba(0,0,0,0.05) !important;
}

.border-radius-lg {
    border-radius: 12px !important;
}

.text-gradient {
    background: linear-gradient(45deg, #5a4de8, #7a5de8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Loading spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #5a4de8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Global modal z-index override - ensures all modals appear above navigation */
.fixed[id*="Modal"], .fixed[id*="modal"], div[id*="Modal"], div[id*="modal"] {
    z-index: 9999 !important;
}

/* SweetAlert2 modal z-index override - ensures all SweetAlert2 modals appear above everything */
.swal2-container {
    z-index: 10000 !important;
}

.swal2-container.swal2-center {
    z-index: 10000 !important;
}

.swal2-container.swal2-backdrop-show {
    z-index: 10000 !important;
}

.swal2-popup {
    z-index: 10001 !important;
}

/* Ensure SweetAlert2 backdrop appears correctly */
.swal2-backdrop-show {
    z-index: 10000 !important;
}

/* Organization Modal Content Background Override */
#organizationModalContent {
    background-color: white !important;
}

.organizationModalContent {
    background-color: white !important;
}

/* Higher priority for specific modal IDs */
#campaignModal, #patientRegistrationModal, #applicationModal, #businessRequestModal,
#sponsorDetailModal, #processModal, #addModal, #patientDetailModal, #doctorModal,
#processDoctorModal, #leadModal, #newMessageModal, #smartRecipientsModal,
#analyticsModal, #linkModal, #testMachineModal, #addConfigModal, #viewPaymentModal,
#viewApplicationModal, #campaignRegistrationModal {
    z-index: 9999 !important;
}

/* Responsive utilities */
@media (max-width: 768px) {
    .table-responsive {
        border-radius: 8px;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .btn {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
}
