/* 
 * Cat Sitting Availability Calendar Styles
 */

.cat-availability-calendar {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: "Inter", sans-serif;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.calendar-header .current-month {
    margin: 0;
    font-family: "Amiri", serif;
    font-size: 32px;
    font-weight: 400;
    letter-spacing: -1px;
    color: #333;
}

.calendar-header .nav-button {
    background: #92705f;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-header .nav-button:hover {
    background: #7a5e4f;
}

.calendar-header .nav-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 6px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 300;
}

.legend-indicator {
    font-size: 18px;
    font-weight: bold;
}

.legend-color-box {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid #ddd;
    display: inline-block;
}

.legend-indicator.available {
    color: #4CAF50;
}

.legend-indicator.good {
    color: #FF9800;
}

.legend-indicator.limited {
    color: #FF5722;
}

.legend-indicator.full {
    color: #f44336;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-top: 20px;
}

.calendar-day-header {
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    padding: 10px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calendar-day {
    aspect-ratio: 1;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background: white;
    transition: all 0.3s ease;
    position: relative;
}

.calendar-day .day-number {
    font-size: 18px;
    font-weight: 300;
    margin-bottom: 5px;
    color: inherit; /* Inherit from parent div's inline style */
}

.calendar-day .availability-indicator {
    font-size: 20px;
    font-weight: bold;
}

.calendar-day .holiday-label {
    position: absolute;
    bottom: 2px;
    left: 2px;
    right: 2px;
    font-size: 9px;
    line-height: 1.2;
    color: #666;
    background: rgba(255, 255, 255, 0.9);
    padding: 2px 4px;
    border-radius: 3px;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
    max-height: 28px;
    overflow: hidden;
}

.calendar-day.empty {
    background: #fafafa;
    border-color: #f0f0f0;
}

.calendar-day.past {
    /* Styling applied via inline styles from JavaScript */
}

.calendar-day.today {
    border-color: #92705f;
    border-width: 3px;
    box-shadow: 0 0 0 3px rgba(146, 112, 95, 0.1);
}

/* Icon mode colors */
.calendar-day.available .availability-indicator {
    color: #4CAF50;
}

.calendar-day.good .availability-indicator {
    color: #FF9800;
}

.calendar-day.limited .availability-indicator {
    color: #FF5722;
}

.calendar-day.full .availability-indicator {
    color: #f44336;
}

/* Colored mode - styles applied via inline CSS from JavaScript */
/* Day numbers with inline color styles don't need additional overrides */
.calendar-day[style*="background-color"] .holiday-label {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    font-weight: 500;
}

.loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
}

.error-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #f44336;
    background: #ffebee;
    border-radius: 8px;
    border: 1px solid #f44336;
}

/* Responsive design */
@media (max-width: 768px) {
    .cat-availability-calendar {
        padding: 10px;
    }
    
    .calendar-header .current-month {
        font-size: 24px;
    }
    
    .calendar-legend {
        gap: 10px;
    }
    
    .legend-item {
        font-size: 12px;
    }
    
    .calendar-grid {
        gap: 5px;
    }
    
    .calendar-day {
        padding: 5px;
    }
    
    .calendar-day .day-number {
        font-size: 14px;
    }
    
    .calendar-day .availability-indicator {
        font-size: 16px;
    }
    
    .calendar-day-header {
        font-size: 11px;
        padding: 5px;
    }
}

@media (max-width: 480px) {
    .calendar-header {
        padding: 15px;
    }
    
    .calendar-header .current-month {
        font-size: 20px;
    }
    
    .calendar-header .nav-button {
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
    
    .calendar-day .day-number {
        font-size: 12px;
    }
    
    .calendar-day .availability-indicator {
        font-size: 14px;
    }
}
