/* Custom CSS for ZonaCentro - minimal overrides to Bootstrap */

/* Custom light color theme */
:root {
    --bs-primary: #4f81bd;
    --bs-primary-rgb: 79, 129, 189;
    --bs-primary-dark: #3e6a99;
    --bs-light: #f8f9fa;
    --bs-body-bg: #ffffff;
    --bs-body-color: #333333;
    --bs-border-color: #e9ecef;
}

/* Calendar-specific styles */
.fc-event {
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.75rem;
    padding: 2px 4px;
}

.fc-event:hover {
    opacity: 0.8;
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

.fc-event-title {
    font-weight: 600;
}

.fc-event-instructor {
    opacity: 0.9;
}

.fc-event-details {
    opacity: 0.8;
}

/* Enrolled class indicator for clients */
.enrolled-class {
    border: 2px solid #dc3545 !important;
    box-shadow: 0 0 0 1px rgba(220, 53, 69, 0.25);
}

.enrolled-class::before {
    content: "✓";
    position: absolute;
    top: -2px;
    right: -2px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* FullCalendar responsive adjustments */
@media (max-width: 768px) {
    .fc-header-toolbar {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .fc-toolbar-chunk {
        display: flex;
        justify-content: center;
    }
    
    .fc-event-title {
        font-size: 0.7rem;
    }
    
    .fc-event-details {
        display: none;
    }
}

/* Modal improvements */
.modal-content {
    border: none;
    border-radius: 8px;
    overflow: hidden;
}

.modal-header {
    border-bottom: 1px solid var(--bs-border-color);
    background: var(--bs-light);
}

/* Card hover effects */
.card {
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Discipline badges */
.badge {
    font-size: 0.75em;
    font-weight: 500;
    padding: 0.375em 0.75em;
}

/* Button improvements */
.btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.15s ease-in-out;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-sm {
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
}

/* Progress bars */
.progress {
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    transition: width 0.6s ease;
}

/* Alert improvements */
.alert {
    border: none;
    border-radius: 6px;
    border-left: 4px solid;
}

.alert-primary {
    border-left-color: var(--bs-primary);
}

.alert-success {
    border-left-color: var(--bs-success);
}

.alert-warning {
    border-left-color: var(--bs-warning);
}

.alert-danger {
    border-left-color: var(--bs-danger);
}

.alert-info {
    border-left-color: var(--bs-info);
}

/* Navigation improvements */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.nav-link {
    font-weight: 500;
    transition: all 0.15s ease-in-out;
}

/* Form improvements */
.form-control,
.form-select {
    border: 1px solid #d0d7de;
    background-color: #ffffff;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
}

.form-check-input {
    border: 1px solid #d0d7de;
}

.form-check-input:checked {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

/* Table improvements */
.table-hover tbody tr:hover {
    background-color: var(--bs-light);
}

/* Stats cards */
.stats-card {
    background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-primary-dark) 100%);
    border: none;
    color: white;
}

.stats-card .card-body {
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(30px, -30px);
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Animation utilities */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive utilities */
@media (max-width: 576px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .btn-group {
        flex-wrap: wrap;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    .modal,
    .alert {
        display: none !important;
    }
    
    .card {
        border: 1px solid #dee2e6 !important;
        box-shadow: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid var(--bs-border-color);
    }
    
    .btn {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible improvements for accessibility */
.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

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

::-webkit-scrollbar-track {
    background: var(--bs-light);
}

::-webkit-scrollbar-thumb {
    background: var(--bs-secondary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bs-dark);
}

/* Light theme specific adjustments */
[data-bs-theme="light"] .modal-header {
    background: var(--bs-light);
    border-bottom: 1px solid var(--bs-border-color);
}

[data-bs-theme="light"] .table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.075);
}

[data-bs-theme="light"] .fc-event {
    border-color: rgba(0, 0, 0, 0.1);
}

[data-bs-theme="light"] .enrolled-class {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 1px rgba(220, 53, 69, 0.3);
}
