/* Novarune Scheduling Date Picker Styles */

.novr-scheduling-date-picker {
    max-width: 500px;
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.novr-scheduling-header h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #333;
}

.novr-scheduling-calendar-container {
    position: relative;
}

.novr-scheduling-loading {
    text-align: center;
    padding: 40px 0;
    color: #666;
}

.novr-scheduling-calendar {
    width: 100%;
}

.calendar-header,
.novr-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 0 10px;
}

.calendar-header h4,
.novr-calendar-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.calendar-header button,
.novr-calendar-header button {
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: background-color 0.2s;
}

.calendar-header button:hover,
.novr-calendar-header button:hover {
    background: #e0e0e0;
}

.calendar-grid {
    width: 100%;
}

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

.weekday,
.novr-weekday {
    padding: 8px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    background: #f8f8f8;
}

.calendar-days,
.novr-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #ddd;
    border: 1px solid #ddd;
}

.calendar-day,
.novr-day {
    min-height: 40px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    font-size: 14px;
    color: #333;
    cursor: default;
    transition: all 0.2s;
}

.calendar-day.empty,
.novr-day.empty {
    background: #f8f8f8;
}

.calendar-day.past,
.novr-day.past {
    color: #ccc;
    background: #f8f8f8;
}

.calendar-day.available,
.novr-day.available {
    cursor: pointer;
    background: #e8f5e8;
    color: #2d7d32;
    border: 1px solid #4caf50;
    margin: 1px;
}

.calendar-day.available:hover,
.novr-day.available:hover {
    background: #c8e6c9;
    transform: scale(1.05);
}

.calendar-day.unavailable,
.novr-day.unavailable {
    color: #999;
    background: #fafafa;
}

.calendar-day.selected {
    background: #2196f3 !important;
    color: white !important;
    font-weight: 600;
}

.novr-scheduling-selected-date,
.novr-selected-date-display {
    margin-top: 15px;
    padding: 15px;
    background: #e3f2fd;
    border: 1px solid #2196f3;
    border-radius: 4px;
}

.novr-scheduling-selected-date p,
.novr-selected-date-display p {
    margin: 0;
    color: #1976d2;
}

.novr-scheduling-time-slots {
    margin-top: 15px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 4px;
}

.novr-scheduling-time-slots h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #333;
}

.time-slots-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
}

.time-slot {
    padding: 10px;
    text-align: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.time-slot:hover {
    background: #e3f2fd;
    border-color: #2196f3;
}

.time-slot.selected {
    background: #2196f3;
    color: white;
    border-color: #1976d2;
}

.novr-scheduling-errors {
    margin-top: 15px;
    padding: 10px;
    background: #ffebee;
    border: 1px solid #f44336;
    border-radius: 4px;
    color: #c62828;
}

.novr-scheduling-no-dates {
    text-align: center;
    padding: 40px 0;
    color: #666;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .novr-scheduling-date-picker {
        margin: 10px 0;
        padding: 15px;
    }
    
    .calendar-header {
        padding: 0 5px;
    }
    
    .calendar-day {
        min-height: 35px;
        font-size: 13px;
    }
    
    .time-slots-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* WooCommerce Integration */
.woocommerce .novr-scheduling-date-picker {
    margin: 20px 0;
}

.woocommerce .single_add_to_cart_button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Block Editor Preview Styles */
.novr-scheduling-date-picker-preview {
    padding: 20px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    text-align: center;
    background: #f9f9f9;
}

.novr-scheduling-date-picker-preview h4 {
    margin: 0 0 10px 0;
    color: #333;
}

.novr-scheduling-date-picker-preview p {
    margin: 5px 0;
    color: #666;
}

/* Accessibility: visible focus for calendar cells generated by JS */
.novr-day:focus {
    outline: 2px solid #1e62d0;
    outline-offset: 2px;
}
