/* Main Styles for Appointment Scheduling System */

/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
}

/* Header Styles */
header {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Calendar Styles */
.calendar {
    background-color: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

.day-cell {
    height: 60px;
    padding: 5px;
    border-radius: 4px;
    margin: 2px;
    position: relative;
    transition: all 0.2s ease;
}

.day-cell a {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
    width: 100%;
    padding: 5px;
}

.day-cell.empty {
    background-color: transparent;
}

.day-cell.available,
.day-cell.available-presencial,
.day-cell.available-distancia {
    background-color: #e8f5e9;
    cursor: pointer;
}

.day-cell.available:hover,
.day-cell.available-presencial:hover,
.day-cell.available-distancia:hover {
    background-color: #c8e6c9;
    transform: scale(1.05);
}

.day-cell.unavailable {
    background-color: #ffebee;
    color: #b71c1c;
    opacity: 0.7;
}

.day-cell.past {
    background-color: #f5f5f5;
    color: #9e9e9e;
    opacity: 0.5;
}

.day-cell.today {
    border: 2px solid #2196f3;
    font-weight: bold;
}

/* Legend Styles */
.legend-item {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 5px;
    border-radius: 4px;
    vertical-align: middle;
}

.legend-item.available,
.legend-item.available-presencial,
.legend-item.available-distancia {
    background-color: #e8f5e9;
}

.legend-item.unavailable {
    background-color: #ffebee;
}

.legend-item.today {
    background-color: #fff;
    border: 2px solid #2196f3;
}

/* Form Styles */
.form-control:focus {
    border-color: #4285f4;
    box-shadow: 0 0 0 0.25rem rgba(66, 133, 244, 0.25);
}

.form-label {
    font-weight: 500;
}

/* Time Slot Selection Styles */
.time-slot {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.time-slot:hover {
    background-color: #f1f8e9;
    border-color: #aed581;
}

.time-slot.selected {
    background-color: #c8e6c9;
    border-color: #81c784;
}

.time-slot.unavailable {
    background-color: #f5f5f5;
    color: #9e9e9e;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Admin Panel Styles */
.admin-sidebar {
    background-color: #343a40;
    color: #fff;
    min-height: calc(100vh - 56px);
}

.admin-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    margin: 0.2rem 0;
}

.admin-sidebar .nav-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.admin-sidebar .nav-link.active {
    color: #fff;
    background-color: #007bff;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card-header {
    border-radius: 10px 10px 0 0 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* Button Styles */
.btn-primary {
    background-color: #4285f4;
    border-color: #4285f4;
}

.btn-primary:hover {
    background-color: #3367d6;
    border-color: #3367d6;
}

.btn-success {
    background-color: #34a853;
    border-color: #34a853;
}

.btn-success:hover {
    background-color: #2e8b57;
    border-color: #2e8b57;
}

/* Responsive Styles */
@media (max-width: 767px) {
    /* Mobile Styles */
    .day-cell {
        height: 50px;
        padding: 2px;
        font-size: 0.9rem;
    }
    
    .calendar .row .col {
        padding: 0 2px;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .form-group {
        margin-bottom: 0.75rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .legend-text {
        font-size: 0.8rem;
    }
    
    /* Improve touch targets */
    .btn, 
    select.form-select, 
    input.form-control {
        min-height: 44px;
    }
    
    /* Fix calendar navigation on small screens */
    .d-flex.justify-content-between.align-items-center {
        flex-wrap: wrap;
    }
    
    .d-flex.justify-content-between.align-items-center h3 {
        width: 100%;
        text-align: center;
        margin: 0.5rem 0;
        order: -1;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    /* Tablet Styles */
    .day-cell {
        height: 55px;
    }
    
    .card-body {
        padding: 1.25rem;
    }
}

@media (display-mode: standalone) {
    /* Styles for when the site is installed as a PWA */
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
}