/* Calendar View Styles */
.calendar-container {
    padding: 20px;
}

.calendar-grid {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background-color: #f8f9fa;
    border-bottom: 1px solid #ddd;
}

.calendar-weekdays .calendar-cell {
    padding: 10px;
    text-align: center;
    font-weight: bold;
    color: #495057;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-auto-rows: 1fr;
    gap: 0;
}

/* Removed aspect ratio pseudo-element that was causing grid shift */

.calendar-cell {
    min-height: 120px;
    height: 120px;
    border-right: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 8px;
    background: white;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.calendar-cell:nth-child(7n) {
    border-right: none;
}

.calendar-cell.empty {
    background-color: #fafafa;
}

.calendar-cell.today {
    background-color: #e3f2fd;
}

.calendar-cell.has-overflow .calendar-appointments::after {
    content: '...';
    position: absolute;
    bottom: 2px;
    right: 5px;
    background: white;
    padding: 0 5px;
    font-weight: bold;
    color: #666;
}

.calendar-day-number {
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
    flex-shrink: 0;
}

.calendar-appointments {
    font-size: 0.85em;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #ccc #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-radius: 4px;
    padding: 2px;
}

.calendar-appointments:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.calendar-appointments::-webkit-scrollbar {
    width: 4px;
}

.calendar-appointments::-webkit-scrollbar-track {
    background: #f0f0f0;
}

.calendar-appointments::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

.calendar-appointments::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.calendar-appointment {
    background-color: #4CAF50;
    color: white;
    padding: 2px 5px;
    margin-bottom: 2px;
    border-radius: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    font-size: 0.8em;
}

.calendar-appointment:hover {
    background-color: #45a049;
}

.appointment-time {
    font-size: 0.9em;
    margin-right: 5px;
}

.appointment-title {
    font-weight: 500;
}

.calendar-more {
    color: #666;
    font-size: 0.8em;
    font-style: italic;
    margin-top: 2px;
}

/* Week View */
.week-view {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    padding: 20px;
}

.week-day {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    min-height: 300px;
}

.week-day h6 {
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

.appointment-block {
    background-color: #e8f5e9;
    border-left: 3px solid #4CAF50;
    padding: 8px;
    margin-bottom: 5px;
    border-radius: 3px;
}

/* Day View */
.day-view {
    padding: 20px;
}

.day-appointments {
    margin-top: 20px;
}

.appointment-detail {
    display: flex;
    margin-bottom: 15px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
    border-left: 4px solid #4CAF50;
}

.appointment-time-block {
    min-width: 150px;
    font-weight: bold;
    color: #4CAF50;
}

.appointment-info {
    flex: 1;
    padding-left: 20px;
}

.appointment-info h6 {
    margin-bottom: 5px;
}

.appointment-info p {
    margin: 0;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .calendar-cell {
        min-height: 100px;
        height: 100px;
        font-size: 0.9em;
    }
    
    .calendar-appointment {
        font-size: 0.75em;
        padding: 1px 3px;
    }
    
    .appointment-time {
        display: none;
    }
    
    .week-view {
        grid-template-columns: 1fr;
    }
    
    .calendar-header {
        flex-direction: column;
        gap: 10px;
    }
}