/* Dark Mode Custom Styles */

/* Loading Spinner Dark Mode */
.dark #loading .bg-white {
    @apply bg-gray-800;
}

.dark #loading .text-gray-600 {
    @apply text-gray-300;
}

/* Statistics Cards Dark Mode */
.dark .bg-white {
    @apply bg-gray-800;
}

.dark .text-gray-800 {
    @apply text-gray-100;
}

.dark .text-gray-500 {
    @apply text-gray-400;
}

.dark .text-gray-600 {
    @apply text-gray-300;
}

.dark .text-gray-700 {
    @apply text-gray-200;
}

/* Modal Dark Mode */
.dark .fixed .bg-white {
    @apply bg-gray-800;
}

.dark .bg-gray-900 {
    @apply bg-gray-900;
}

/* Form Elements Dark Mode */
.dark input[type="text"],
.dark input[type="email"],
.dark input[type="tel"],
.dark input[type="time"],
.dark input[type="date"],
.dark select,
.dark textarea {
    @apply bg-gray-700 border-gray-600 text-gray-100;
}

.dark input[type="text"]:focus,
.dark input[type="email"]:focus,
.dark input[type="tel"]:focus,
.dark input[type="time"]:focus,
.dark input[type="date"]:focus,
.dark select:focus,
.dark textarea:focus {
    @apply border-indigo-400 ring-indigo-400;
}

/* Button Dark Mode */
.dark button:not(.bg-indigo-600):not(.bg-green-600):not(.bg-red-600):not(.bg-yellow-500):not(.bg-blue-600):not(.bg-gray-600) {
    @apply bg-gray-700 text-gray-100 hover:bg-gray-600;
}

/* Schedule Cell Button Styling */
.dark .assign-btn {
    @apply bg-red-600 text-white px-2 py-1 rounded text-xs hover:bg-red-700;
}

.dark .reassign-btn {
    @apply bg-gray-600 text-white px-2 py-1 rounded text-xs hover:bg-gray-700;
}

/* Table Dark Mode */
.dark table {
    @apply bg-gray-800;
}

.dark th {
    @apply bg-gray-700 text-gray-100;
}

.dark td {
    @apply border-gray-600 text-gray-200;
}

.dark tr:hover {
    @apply bg-gray-700;
}

/* Schedule Grid Dark Mode - DARKER CELL COLORS */
.dark .coverage-cell {
    @apply border-gray-600;
}

.dark .no-coverage {
    background-color: rgba(127, 29, 29, 0.8) !important;
    color: #fecaca !important;
}

.dark .single-coverage {
    background-color: rgba(20, 83, 45, 0.8) !important;
    color: #bbf7d0 !important;
}

.dark .partial-coverage {
    background-color: rgba(146, 64, 14, 0.8) !important;
    color: #fef3c7 !important;
}

.dark .multiple-coverage {
    background-color: rgba(30, 58, 138, 0.8) !important;
    color: #bfdbfe !important;
}

.dark .subspecialty-name {
    @apply bg-gray-700 text-gray-100 border-gray-600;
}

.dark .subspecialty-row:hover {
    @apply bg-gray-700;
}

/* Dark mode toggle button highlight */
.dark #dark-mode-toggle {
    @apply bg-gray-700;
}

/* Alert Dark Mode */
.dark .alert-success {
    @apply bg-green-800 border-green-600 text-green-100;
}

.dark .alert-error {
    @apply bg-red-800 border-red-600 text-red-100;
}

.dark .alert-warning {
    @apply bg-yellow-800 border-yellow-600 text-yellow-100;
}

.dark .alert-info {
    @apply bg-blue-800 border-blue-600 text-blue-100;
}

/* Custom dropdown dark mode */
.dark .dropdown-content {
    @apply bg-gray-800 border-gray-600;
}

.dark .dropdown-option {
    @apply text-gray-200 hover:bg-gray-700;
}

.dark .dropdown-option:hover {
    @apply bg-gray-700;
}

/* Filter status dark mode */
.dark .filter-status {
    @apply bg-blue-900 bg-opacity-30 border-blue-600;
}

.dark .filter-status .text-blue-800 {
    @apply text-blue-200;
}

/* Chart containers */
.dark .chart-container {
    @apply bg-gray-800;
}

/* System schedule specific */
.dark .grid-header {
    @apply bg-gray-700;
}

.dark .day-header {
    @apply text-gray-100;
}

.dark .grid-container {
    @apply bg-gray-800;
}

.dark #system-schedule-grid {
    @apply bg-gray-800;
}

/* Schedule grid table styling */
.dark .grid-container {
    @apply bg-gray-800 text-gray-100;
}

.dark .grid-header {
    @apply bg-gray-700 text-gray-100;
}

/* Week selector styling */
.dark #system-week-selector option {
    @apply bg-gray-700 text-gray-200;
}

/* Additional text colors */
.dark h1, .dark h2, .dark h3, .dark h4, .dark h5, .dark h6 {
    @apply text-gray-100;
}

.dark p, .dark span, .dark div {
    @apply text-gray-200;
}

/* Force background for any remaining white elements */
.dark .bg-white:not(.alert-success):not(.alert-error):not(.alert-warning):not(.alert-info) {
    background-color: #1f2937 !important;
    color: #f3f4f6 !important;
}

/* Force all light backgrounds to be dark */
.dark .bg-green-100,
.dark .bg-yellow-100,
.dark .bg-red-100,
.dark .bg-blue-100 {
    background-color: #1f2937 !important;
}

/* Filter section specific */
.dark .bg-gray-50 {
    @apply bg-gray-700 !important;
}

/* Any remaining borders */
.dark .border:not(.dark\:border-gray-600) {
    @apply border-gray-600 !important;
}

/* System schedule specific elements */
.dark .subspecialty-header,
.dark .day-header {
    @apply bg-gray-700 text-gray-100;
}

/* Override any inline styles or stubborn elements */
.dark * {
    border-color: theme('colors.gray.600') !important;
}

/* Force all remaining backgrounds */
.dark .bg-gray-50,
.dark [class*="bg-gray-50"] {
    @apply bg-gray-700 !important;
}

.dark .text-gray-500 {
    @apply text-gray-300 !important;
}

.dark .text-gray-600 {
    @apply text-gray-300 !important;
}

.dark .text-gray-700 {
    @apply text-gray-200 !important;
}

/* Ensure all grid elements are dark */
.dark .grid-container,
.dark .grid-container * {
    background-color: theme('colors.gray.800') !important;
    color: theme('colors.gray.100') !important;
}

/* Nuclear option - override all problematic classes */
.dark .bg-green-100,
.dark .bg-green-200,
.dark .bg-yellow-100, 
.dark .bg-yellow-200,
.dark .bg-red-100,
.dark .bg-red-200,
.dark .bg-blue-100,
.dark .bg-blue-200,
.dark .bg-pink-100,
.dark .bg-pink-200 {
    background-color: #1f2937 !important;
    color: #f3f4f6 !important;
}

/* Stronger schedule cell overrides */
.dark .coverage-cell.no-coverage {
    background-color: rgba(127, 29, 29, 0.9) !important;
}

.dark .coverage-cell.single-coverage {
    background-color: rgba(20, 83, 45, 0.9) !important;
}

.dark .coverage-cell.partial-coverage {
    background-color: rgba(146, 64, 14, 0.9) !important;
}

.dark .coverage-cell.multiple-coverage {
    background-color: rgba(30, 58, 138, 0.9) !important;
}

/* Dropdown arrow styling - fix double arrows */
select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
}

/* Custom single arrow for dropdowns */
select[class*="appearance-none"] {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTIuNSA0LjVMNiA4TDkuNSA0LjUiIHN0cm9rZT0iIzk0YTNiOCIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8L3N2Zz4K') !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 12px 12px !important;
    padding-right: 2.5rem !important;
}

/* Dark mode arrow - lighter color */
.dark select[class*="appearance-none"] {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTIuNSA0LjVMNiA4TDkuNSA0LjUiIHN0cm9rZT0iI2Q5ZTJlYyIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8L3N2Zz4K') !important;
}

/* Fix doctors page elements */
.dark .doctors-table th {
    @apply bg-gray-600 text-gray-200;
}

.dark .doctors-table td {
    @apply text-gray-200;
}

.dark .doctors-filters {
    @apply bg-gray-700;
}

.dark .status-badge {
    @apply bg-gray-600 text-gray-200;
}

/* Smooth transitions for all dark mode changes */
* {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
} 