/* Volunteer Pages Dark Mode Enhancements */
@media (prefers-color-scheme: dark) {
    /* CRITICAL FIX for dark-on-dark button issue */
    /* Force proper colors on all button types */
    .btn-theme-primary {
        background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
        color: white !important;
        border: 1px solid rgba(99, 102, 241, 0.3) !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }
    
    .btn-theme-primary:hover:not(:disabled) {
        background: linear-gradient(135deg, #7577f5 0%, #5a52e8 100%) !important;
        filter: brightness(1.15);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
        transform: translateY(-1px);
        color: white !important;
    }
    
    .btn-theme-accent {
        background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
        color: white !important;
        border: 1px solid rgba(249, 115, 22, 0.3) !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }
    
    .btn-theme-accent:hover:not(:disabled) {
        background: linear-gradient(135deg, #fb8332 0%, #ec6820 100%) !important;
        filter: brightness(1.15);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
        transform: translateY(-1px);
        color: white !important;
    }
    
    .btn-theme-outline {
        background: rgba(99, 102, 241, 0.1) !important;
        color: #818cf8 !important;
        border: 2px solid #818cf8 !important;
        font-weight: 500;
    }
    
    .btn-theme-outline:hover:not(:disabled) {
        background: rgba(99, 102, 241, 0.2) !important;
        border-color: #60a5fa !important;
        color: #60a5fa !important;
        transform: translateY(-1px);
    }
    
    /* Ensure button text and icons are visible */
    .btn-theme-primary .btn-text,
    .btn-theme-primary .btn-icon,
    .btn-theme-primary i,
    .btn-theme-accent .btn-text,
    .btn-theme-accent .btn-icon,
    .btn-theme-accent i {
        color: white !important;
    }
    
    .btn-theme-outline .btn-text,
    .btn-theme-outline .btn-icon,
    .btn-theme-outline i {
        color: inherit !important;
    }
    
    /* Better form input contrast */
    .form-control:not(:focus),
    .form-select:not(:focus) {
        background: var(--theme-surface-2);
    }
    
    .form-control:hover,
    .form-select:hover {
        border-color: var(--theme-text-muted);
    }
    
    /* Enhance empty state visibility */
    .empty-state {
        background: var(--theme-surface-1);
        border-radius: 12px;
        padding: 4rem 2rem;
        border: 1px dashed var(--theme-border-color);
    }
    
    .empty-state i {
        opacity: 0.5;
    }
    
    .empty-state .btn {
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    }
    
    /* Card enhancements */
    .card {
        border-width: 1px;
        border-color: rgba(255, 255, 255, 0.08);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    }
    
    .card:hover {
        box-shadow: 0 8px 12px rgba(0, 0, 0, 0.4);
    }
    
    .card-header {
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    }
    
    .card-header.bg-success,
    .card-header.bg-primary,
    .card-header[class*="bg-"] {
        border-bottom-color: rgba(0, 0, 0, 0.3) !important;
    }
    
    /* Badge improvements */
    .badge {
        font-weight: 600;
        letter-spacing: 0.025em;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    }
    
    /* Progress bar enhancements */
    .progress {
        box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
        border: 1px solid var(--theme-border-color);
    }
    
    .progress-bar {
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    }
    
    /* Alert improvements */
    .alert-info,
    .alert-danger,
    .alert-warning {
        border-width: 1px;
        font-weight: 500;
    }
    
    .alert-info {
        background: rgba(59, 130, 246, 0.15);
        border-color: rgba(59, 130, 246, 0.4);
    }
    
    .alert-danger {
        background: rgba(239, 68, 68, 0.15);
        border-color: rgba(239, 68, 68, 0.4);
    }
    
    .alert-warning {
        background: rgba(245, 158, 11, 0.15);
        border-color: rgba(245, 158, 11, 0.4);
    }
    
    /* Stat card color improvements */
    .stat-primary .stat-icon {
        color: #60a5fa;
    }
    
    .stat-success .stat-icon {
        color: #34d399;
    }
    
    .stat-info .stat-icon {
        color: #818cf8;
    }
    
    .stat-warning .stat-icon {
        color: #fbbf24;
    }
    
    /* Form label improvements */
    .form-label {
        font-weight: 600;
    }
    
    .form-text {
        opacity: 0.8;
    }
    
    /* Modal enhancements */
    .modal-backdrop {
        background-color: rgba(0, 0, 0, 0.8);
    }
    
    .modal-content {
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
    }
    
    .btn-close {
        filter: invert(1) grayscale(100%) brightness(200%);
    }
    
    /* Job card specific improvements */
    .job-card-inner.job-full {
        opacity: 0.6;
    }
    
    .job-card-inner.job-past {
        opacity: 0.5;
    }
    
    /* Calendar improvements */
    .fc-button-primary {
        font-weight: 500;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }
    
    .fc-button-primary:not(:disabled):active {
        box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
    }
    
    /* Text contrast improvements */
    .text-muted {
        color: var(--theme-text-muted) !important;
        opacity: 0.9;
    }
    
    /* Link contrast */
    a:not(.btn) {
        color: #60a5fa;
    }
    
    a:not(.btn):hover {
        color: #93bbfc;
    }
    
    /* Dropdown arrow color fix */
    select.form-select {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23cbd5e1' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    }
    
    /* Enhance hover states */
    .stat-card:hover,
    .project-card-inner:hover,
    .job-card-inner:hover,
    .job-item:hover {
        border-color: rgba(255, 255, 255, 0.15);
    }
}