/**
 * Sacred Booking Calendar & Dynamic Slot Picker Styles (Compact & Fully Responsive)
 * Project: soulguidedbymansi | Inner Light Healing
 * Location: /mansi/assets/css/booking_calendar.css
 * Timezone: Asia/Kolkata (Indian Standard Time)
 */

.calendar-field-group {
    margin-bottom: 8px;
}

.calendar-main-label {
    font-weight: 700;
    color: #2e1d0c;
    font-size: 11px;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.calendar-main-label .tz-badge {
    font-weight: 600;
    font-size: 10px;
    color: #7b4d17;
    text-transform: none;
}

.sacred-calendar-container {
    background: #ffffff;
    border: 1.5px solid #ebd9bf;
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(123, 77, 23, 0.03);
    box-sizing: border-box;
    width: 100%;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;
    padding-bottom: 4px;
    border-bottom: 1px solid #f2e6d6;
}

.calendar-month-title {
    font-family: Georgia, serif;
    font-size: 12.5px;
    font-weight: 700;
    color: #2e1d0c;
    display: flex;
    align-items: center;
    gap: 4px;
}

.calendar-nav-btn {
    background: #faf4e9;
    border: 1px solid #ebd9bf;
    color: #7b4d17;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    transition: all 0.15s ease;
    touch-action: manipulation;
}

.calendar-nav-btn:hover:not(:disabled) {
    background: #b47a18;
    color: #ffffff;
    border-color: #b47a18;
}

.calendar-nav-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.calendar-weekdays-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 9.5px;
    font-weight: 700;
    color: #8c7b6d;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 3px;
}

.calendar-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.calendar-day-cell {
    height: 24px;
    min-height: 24px;
    aspect-ratio: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 10.5px;
    font-weight: 600;
    color: #3b2a1a;
    border-radius: 4px;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    transition: all 0.12s ease;
    position: relative;
    user-select: none;
    padding: 0;
    touch-action: manipulation;
}

.calendar-day-cell:hover:not(.day-disabled):not(.day-empty) {
    background: #faf3e8;
    border-color: #d4a742;
    color: #7b4d17;
}

.calendar-day-cell.day-empty {
    cursor: default;
    background: transparent;
    border-color: transparent;
}

.calendar-day-cell.day-disabled {
    color: #c4b5a5;
    cursor: not-allowed;
    background: #faf8f5;
    opacity: 0.45;
}

.calendar-day-cell.day-today {
    border-color: #b47a18;
    font-weight: 700;
}

.calendar-day-cell.day-today::after {
    content: '';
    position: absolute;
    bottom: 2px;
    width: 2.5px;
    height: 2.5px;
    border-radius: 50%;
    background: #b47a18;
}

.calendar-day-cell.day-selected {
    background: linear-gradient(135deg, #b47a18 0%, #8c5d13 100%) !important;
    color: #ffffff !important;
    font-weight: 700;
    border-color: #7b4d17 !important;
    box-shadow: 0 1px 4px rgba(180, 122, 24, 0.35);
    transform: scale(1.02);
}

.calendar-day-cell.day-selected::after {
    background: #ffffff;
}

/* Selected Date Banner */
.selected-date-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #faf4e9;
    border: 1px dashed #ebd9bf;
    border-radius: 6px;
    padding: 5px 8px;
    margin-top: 6px;
    font-size: 11px;
    color: #5a3c18;
    box-sizing: border-box;
}

.selected-date-banner strong {
    color: #2e1d0c;
}

/* Dynamic Slots Picker Container */
.slots-picker-container {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed #ebd9bf;
}

.slots-picker-header {
    font-size: 11px;
    font-weight: 700;
    color: #2e1d0c;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.slots-tz-indicator {
    font-size: 10px;
    font-weight: 500;
    color: #8c7b6d;
}

#calTimeSlotSelect {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 6px 10px !important;
    font-size: 12px !important;
    height: 36px !important;
    min-height: 36px !important;
    border: 1.5px solid #d4c1aa !important;
    border-radius: 6px !important;
    background-color: #ffffff !important;
    color: #2e1d0c !important;
    font-weight: 600 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    cursor: pointer !important;
    outline: none !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#calTimeSlotSelect option {
    font-size: 12px !important;
    color: #2e1d0c !important;
    background-color: #ffffff !important;
    padding: 6px 8px !important;
}

#calTimeSlotSelect:focus {
    border-color: #b47a18 !important;
    box-shadow: 0 0 0 2px rgba(180, 122, 24, 0.18) !important;
}

/* Slot Selection Confirmation Ribbon */
.slot-selected-ribbon {
    background: #eef7ee;
    border: 1px solid #c8e6c9;
    color: #2e7d32;
    border-radius: 5px;
    padding: 5px 8px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 6px;
    box-sizing: border-box;
    word-break: break-word;
}

/* Dynamic Slot Pills Grid (Available vs Booked) */
.cal-slots-pills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    margin-bottom: 6px;
}

.cal-slot-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    user-select: none;
    border: 1px solid #d4c1aa;
    background: #faf6f0;
    color: #3e2723;
}

.cal-slot-pill:hover:not(.booked):not(.elapsed) {
    background: #f0e6d6;
    border-color: #b47a18;
    transform: translateY(-1px);
}

.cal-slot-pill.selected {
    background: #b47a18 !important;
    border-color: #8b5b0e !important;
    color: #ffffff !important;
    box-shadow: 0 2px 5px rgba(180, 122, 24, 0.35);
}

.cal-slot-pill.booked {
    background: #fde8e8 !important;
    border-color: #f8b4b4 !important;
    color: #9b1c1c !important;
    cursor: not-allowed !important;
    opacity: 0.88;
    text-decoration: line-through;
}

.cal-slot-pill.elapsed {
    background: #f3f4f6 !important;
    border-color: #e5e7eb !important;
    color: #9ca3af !important;
    cursor: not-allowed !important;
    opacity: 0.75;
}

.cal-pill-badge {
    font-size: 9.5px;
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none !important;
    display: inline-block;
}

.cal-slot-pill.booked .cal-pill-badge {
    background: #c81e1e;
    color: #ffffff;
    text-decoration: none;
}

.cal-slot-pill.available .cal-pill-badge {
    background: #def7ec;
    color: #03543f;
}

.calendar-day-cell.has-booked-dot::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background-color: #b47a18;
    border-radius: 50%;
}

/* Mobile responsive adjustments */
@media (max-width: 579px) {
    .sacred-calendar-container {
        padding: 6px 8px;
        margin-bottom: 6px;
    }

    .calendar-month-title {
        font-size: 12px;
    }

    .calendar-nav-btn {
        width: 24px;
        height: 24px;
        font-size: 9px;
    }

    .calendar-weekdays-grid {
        font-size: 9px;
        margin-bottom: 2px;
    }

    .calendar-day-cell {
        height: 22px;
        min-height: 22px;
        font-size: 10px;
    }

    .selected-date-banner {
        padding: 4px 6px;
        font-size: 10px;
    }

    .slots-picker-header {
        font-size: 10.5px;
    }

    #calTimeSlotSelect {
        font-size: 11.5px !important;
        height: 35px !important;
        padding: 5px 8px !important;
    }

    .slot-selected-ribbon {
        font-size: 10.5px;
        padding: 4px 6px;
    }
}
