/* Resly iCal Calendar Styles */

.resly-ical-calendar {
    max-width: 100%;
    margin: 2rem 0;
}

.calendar-title {
    color: #1d6f78;
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0 0 1.5rem 0;
    text-align: center;
}

.calendar-legend {
    display: flex;
    justify-content: flex-start;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: #6c757d;
}

.calendar-legend span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.color-box {
    width: 14px;
    height: 14px;
    border-radius: 2px;
}

.color-box.available {
    background: #28a745;
}

.color-box.unavailable {
    background: #e9ecef;
}

/* Navigation */
.calendar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding: 0 1rem;
}

.nav-btn {
    background: transparent;
    border: none;
    color: #e91e63;
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    transition: all 0.2s ease;
    border-radius: 50%;
}

.nav-btn:hover:not(:disabled) {
    background: rgba(233, 30, 99, 0.1);
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.current-month {
    font-size: 1.25rem;
    font-weight: 600;
    color: #212529;
}

/* Calendar Grid Container */
.calendar-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.has-navigation .calendar-grid-container {
    grid-template-columns: 1fr;
    max-width: 450px;
    margin: 0 auto;
}

.calendar-month {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.has-navigation .calendar-header {
    display: none;
}

.calendar-header {
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1rem;
    color: #212529;
}

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

.day-header {
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    padding: 0.5rem 0;
    color: #6c757d;
}

.day-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    background: #f8f9fa;
    color: #6c757d;
    transition: all 0.2s ease;
}

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

.day-cell.past {
    background: #f8f9fa;
    color: #ced4da;
}

.day-cell.available {
    background: #28a745;
    color: white;
    cursor: pointer;
    font-weight: 600;
}

.day-cell.available:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.day-cell.unavailable {
    background: #f8f9fa;
    color: #ced4da;
}

.day-cell.loading {
    background: #f8f9fa;
    color: #ced4da;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.calendar-loading {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
    font-style: italic;
}

.resly-ical-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

/* Responsive */
@media (max-width: 768px) {
    .calendar-grid-container {
        grid-template-columns: 1fr;
    }
    
    .calendar-month {
        padding: 1.25rem;
    }
    
    .calendar-grid {
        gap: 6px;
    }
    
    .day-cell {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .day-header {
        font-size: 0.65rem;
        padding: 0.4rem 0;
    }
    
    .calendar-grid {
        gap: 4px;
    }
    
    .day-cell {
        font-size: 0.8rem;
        border-radius: 6px;
    }
    
    .calendar-title {
        font-size: 1.5rem;
    }
    
    .calendar-month {
        padding: 1rem;
    }
}
