/* ===================================================================
   Palatin Theme - Custom Calendar Datepicker Styles
   Theme Colors:
     Accent / Terracotta: #cb8670
     Dark / Base:        #363636
     Popup Background:   #2b2b2b
     Text / Highlight:   #ffffff
   =================================================================== */

/* Stacking context: ensure book-now-form sits above subsequent sections, but cleanly beneath sticky navbar */
.book-now-area {
    position: relative;
    z-index: 100;
}

.book-now-form {
    position: relative;
    z-index: 105;
}

/* Form Group Overrides */
.book-now-form form .form-group.date-picker-group {
    position: relative;
    cursor: pointer;
}

.book-now-form form .form-group.date-picker-group.active {
    z-index: 500 !important;
}

.book-now-form form .form-group.date-picker-group * {
    box-sizing: border-box;
}

/* Date Input Wrapper */
.date-input-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.date-input-wrapper .datepicker-input {
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    color: #ffffff !important;
    font-size: 24px;
    font-weight: 400;
    line-height: 1;
    padding: 0 30px 0 0 !important;
    width: 100%;
    cursor: pointer;
    box-shadow: none !important;
    height: auto !important;
    outline: none !important;
    font-family: inherit;
    user-select: none;
}

@media only screen and (min-width: 992px) and (max-width: 1199px) {
    .date-input-wrapper .datepicker-input {
        font-size: 18px;
    }
}
@media only screen and (min-width: 768px) and (max-width: 991px) {
    .date-input-wrapper .datepicker-input {
        font-size: 14px;
    }
}
@media only screen and (max-width: 767px) {
    .date-input-wrapper .datepicker-input {
        font-size: 18px;
    }
}

/* Calendar Icon (Replaces nice-select Up/Down Arrow) */
.date-input-wrapper .calendar-icon {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #ffffff;
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    transition: color 0.3s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.date-input-wrapper:hover .calendar-icon,
.date-picker-group.active .calendar-icon {
    color: #cb8670;
    transform: translateY(-50%) scale(1.1);
}

/* Calendar Popup Card */
.palatin-calendar {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    width: 290px;
    background-color: #2b2b2b;
    border: 2px solid #cb8670;
    border-radius: 2px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
    z-index: 501;
    padding: 16px 14px 12px;
    display: none;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    user-select: none;
}

.palatin-calendar.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Calendar Header */
.palatin-calendar .cal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(203, 134, 112, 0.35);
}

.palatin-calendar .cal-month-year {
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: capitalize;
}

.palatin-calendar .cal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 3px;
    border: 1px solid rgba(203, 134, 112, 0.5);
    color: #cb8670;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    padding: 0;
    user-select: none;
}

.palatin-calendar .cal-btn:hover {
    background-color: #cb8670;
    color: #ffffff;
    border-color: #cb8670;
}

/* Weekday Labels */
.palatin-calendar .cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    text-align: center;
    margin-bottom: 6px;
}

.palatin-calendar .cal-weekdays span {
    font-size: 11px;
    font-weight: 600;
    color: #cb8670;
    text-transform: uppercase;
    display: block;
    padding: 2px 0;
}

/* Days Grid */
.palatin-calendar .cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    text-align: center;
}

.palatin-calendar .cal-day {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    width: 32px;
    margin: 0 auto;
    font-size: 13px;
    color: #ffffff;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.palatin-calendar .cal-day:hover:not(.other-month) {
    background-color: rgba(203, 134, 112, 0.35);
    color: #ffffff;
}

.palatin-calendar .cal-day.other-month {
    color: #666666;
    cursor: pointer;
}

.palatin-calendar .cal-day.other-month:hover {
    color: #999999;
    background-color: rgba(255, 255, 255, 0.05);
}

.palatin-calendar .cal-day.today {
    border: 1px solid #cb8670;
}

.palatin-calendar .cal-day.selected {
    background-color: #cb8670 !important;
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(203, 134, 112, 0.5);
}

/* Footer (Today Quick Button & Close) */
.palatin-calendar .cal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(203, 134, 112, 0.35);
}

.palatin-calendar .cal-today-btn {
    display: inline-block;
    color: #cb8670;
    font-size: 12px;
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.2s ease;
    user-select: none;
}

.palatin-calendar .cal-today-btn:hover {
    color: #ffffff;
    text-decoration: underline;
}

.palatin-calendar .cal-close-btn {
    display: inline-block;
    color: #888888;
    font-size: 12px;
    cursor: pointer;
    transition: color 0.2s ease;
    user-select: none;
}

.palatin-calendar .cal-close-btn:hover {
    color: #ffffff;
}
