/* TidyCal Booking Widget Styles */
.tidycal-booking-widget {
    max-width: 800px;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

@media (max-width: 991px) {
    .tidycal-booking-widget {
        flex-direction: column;
        gap: 15px;
    }
    
    .calendar-date.selected {
        background: var(--protos-primary) !important;
        color: var(--protos-almost-black) !important;
        font-weight: 600;
    }
}

/* Calendar Styles */
.tidycal-calendar {
    border: 1px solid var(--protos-primary);
    border-radius: 8px;
    padding: 20px;

}

.calendar-grid {
    width: 100%;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--protos-primary);
}

.calendar-header button {
    background: transparent;
    border: 1px solid var(--protos-primary);
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    color: var(--protos-text-body);
    transition: all 0.2s ease;
}

.calendar-header button:hover {
    background: var(--protos-primary);
    color: white;
}

.current-month {
    font-size: 18px;
    font-weight: 600;
    color: var(--protos-text-title);
}

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

.day-header {
    padding: 10px;
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    color: var(--protos-text-title);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.calendar-date {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
    border: 1px solid transparent;
    color: var(--protos-text-body);
}

.calendar-date:hover:not(.past-date):not(.other-month) {
    border-color: var(--protos-primary);
    color: var(--protos-primary);
}

.calendar-date.selected {
    background: var(--protos-primary);
    color: var(--protos-almost-black) !important;
    border-color: var(--protos-primary);
}

.calendar-date.past-date {
    color: #adb5bd;
    cursor: default;
    opacity: 0.5;
}

.calendar-date.other-month {
    color: #ced4da;
    cursor: default;
    opacity: 0.6;
}

.calendar-date.unavailable-date {
    color: #adb5bd;
    cursor: default;
    opacity: 0.5;
}

.calendar-date.future-unavailable {
    color: #ced4da;
    cursor: default;
    opacity: 0.3;
    font-style: italic;
}

/* Timeslots Styles */
.tidycal-timeslots {
    border: 1px solid var(--protos-primary);
    border-radius: 8px;
    padding: 20px;
    min-height: 200px;
    flex: 1;
    display: none; /* Hidden until date is selected */
}

.tidycal-timeslots.show {
    display: block;
}

.tidycal-timeslots h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--protos-text-title);
}

.timeslots-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: stretch;
}

.timeslot {
    flex: 0 0 calc(25% - 8px); /* 4 columns on desktop */
}

@media (max-width: 991px) {
    .timeslot {
        flex: 0 0 calc(33.333% - 7px); /* 3 columns on mobile */
    }
}

.timeslot {
    padding: 12px 16px;
    border: 1px solid var(--protos-primary);
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--protos-text-body);
    transition: all 0.2s ease;
    text-align: center;
}

.timeslot:hover {
    background: var(--protos-primary);
    color: var(--protos-almost-black);
}

.timeslot.selected {
    background: var(--protos-primary);
    color: var(--protos-almost-black);
}

.loading {
    text-align: center;
    padding: 40px 20px;
    color: var(--protos-text-body);
    font-style: italic;
}

.no-slots-message,
.error-message {
    text-align: center;
    padding: 30px 20px;
    border-radius: 6px;
    border: 1px solid var(--protos-primary);
}

.no-slots-message h4 {
    margin: 0 0 10px 0;
    color: var(--protos-text-title);
    font-size: 16px;
}

.no-slots-message p,
.error-message p {
    margin: 0;
    color: var(--protos-text-body);
    font-size: 14px;
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 991px) {
    .tidycal-booking-widget {
        flex-direction: column;
        margin: 15px 0;
    }
    
    .tidycal-calendar,
    .tidycal-timeslots {
        padding: 15px;
        min-width: auto;
        width:100%;
    }
    
    .timeslots-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .tidycal-booking-widget {
        flex-direction: column;
    }
    
    .calendar-header button {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .current-month {
        font-size: 16px;
    }
    
    .day-header {
        font-size: 11px;
        padding: 8px;
    }
    
    .calendar-date {
        font-size: 13px;
    }
    
    .timeslot {
        padding: 10px 12px;
        font-size: 13px;
    }
}

@media (max-width: 320px) {
    .tidycal-booking-widget {
        margin: 10px 0;
    }
    
    .tidycal-calendar,
    .tidycal-timeslots {
        padding: 12px;
    }
    
    .timeslots-grid {
        grid-template-columns: 1fr;
    }
    
    .timeslot {
        padding: 10px;
        font-size: 12px;
    }
    
    .calendar-header {
        margin-bottom: 12px;
    }
    
    .current-month {
        font-size: 14px;
    }
}