/* ============================================================
   SR Tour Availability — Dashboard Styles
   ============================================================ */

/* Intro paragraph */
.sr-tour-avail-intro {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

/* Section sub-labels */
.sr-avail-section-label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 14px;
}

.sr-avail-sub-label {
    display: block;
    font-size: 12px;
    color: #888;
    margin-bottom: 4px;
}

.sr-avail-help-text {
    font-size: 13px;
    color: #888;
    margin-bottom: 10px;
}

/* Toggle switch */
.sr-toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    margin: 0;
    cursor: pointer;
}

.sr-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.sr-toggle-slider {
    position: absolute;
    inset: 0;
    background-color: #ccc;
    border-radius: 26px;
    transition: background-color 0.2s;
}

.sr-toggle-slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}

.sr-toggle-switch input:checked + .sr-toggle-slider {
    background-color: #28a745;
}

.sr-toggle-switch input:checked + .sr-toggle-slider::before {
    transform: translateX(22px);
}

/* Days grid */
.sr-days-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sr-day-checkbox {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 56px;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: border-color 0.15s, background-color 0.15s;
    text-align: center;
}

.sr-day-checkbox input[type="checkbox"] {
    margin-bottom: 4px;
}

.sr-day-checkbox:has(input:checked) {
    border-color: #007bff;
    background-color: #e8f0fe;
}

/* Time window */
.sr-time-window-wrap {
    gap: 16px;
}

.sr-time-input {
    max-width: 140px;
}

/* Advance / duration selects */
.sr-avail-select {
    max-width: 180px;
}

/* Blocked dates */
.sr-blocked-dates-wrap .mr-2 {
    margin-right: 8px;
}

.sr-blocked-list {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
}

.sr-blocked-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    border: 1px solid #eee;
    border-radius: 4px;
    margin-bottom: 4px;
    font-size: 13px;
    background: #fafafa;
}

.sr-remove-blocked {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0 4px;
    transition: color 0.15s;
}

.sr-remove-blocked:hover {
    color: #dc3545;
}

/* Save button area */
#sr-save-tour-availability {
    min-width: 180px;
}

/* ============================================================
   SR Tour Availability — Frontend Tour Form Styles
   ============================================================ */

.sr-tour-calendar {
    margin-bottom: 12px;
}

/* Month navigation header */
.sr-tour-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.sr-tour-cal-header h5 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.sr-cal-nav-btn {
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1.2;
    color: #555;
    transition: border-color 0.15s, color 0.15s;
}

.sr-cal-nav-btn:hover:not(:disabled) {
    border-color: #007bff;
    color: #007bff;
}

.sr-cal-nav-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

/* Date grid */
.sr-tour-date-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 10px;
}

.sr-tour-date-grid .sr-dow-label {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #888;
    padding: 4px 0;
    text-transform: uppercase;
}

.sr-date-btn {
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    padding: 6px 4px;
    font-size: 12px;
    text-align: center;
    line-height: 1.3;
    transition: border-color 0.15s, background-color 0.15s, color 0.15s;
    min-height: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.sr-date-btn:not(.sr-date-unavailable):not(.sr-date-past):not(.sr-date-empty) {
    border-color: #c8e6c9;
    background-color: #f1f8f2;
}

.sr-date-btn:hover:not(.sr-date-unavailable):not(.sr-date-past):not(.sr-date-empty) {
    border-color: #007bff;
    background-color: #e8f0fe;
    color: #007bff;
}

.sr-date-btn.sr-date-selected {
    border-color: #007bff;
    background-color: #007bff;
    color: #fff;
}

/* Past dates — greyed out with strikethrough */
.sr-date-btn.sr-date-past {
    background-color: #f0f0f0;
    border-color: #e0e0e0;
    color: #bbb;
    cursor: not-allowed;
    opacity: 1;
}

.sr-date-btn.sr-date-past .sr-date-num {
    text-decoration: line-through;
}

/* Unavailable future dates — light red, clearly blocked */
.sr-date-btn.sr-date-unavailable {
    background-color: #fde8e8;
    border-color: #f5c6c6;
    color: #c0392b;
    cursor: not-allowed;
    opacity: 1;
}

.sr-date-btn.sr-date-empty {
    border-color: transparent;
    background: transparent;
    cursor: default;
}

.sr-date-num {
    font-weight: 600;
    font-size: 14px;
}

.sr-date-dow {
    font-size: 10px;
    color: inherit;
    opacity: 0.8;
}

/* Time slot grid */
.sr-time-slot-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.sr-time-btn {
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    padding: 6px 12px;
    font-size: 13px;
    transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}

.sr-time-btn:hover {
    border-color: #007bff;
    background-color: #e8f0fe;
}

.sr-time-btn.sr-time-selected {
    border-color: #007bff;
    background-color: #007bff;
    color: #fff;
}

/* Loading / empty state */
.sr-avail-loading,
.sr-avail-no-slots {
    text-align: center;
    color: #888;
    font-size: 13px;
    padding: 12px 0;
}

.sr-avail-loading i {
    margin-right: 6px;
}
