/* Scoped Flatpickr + appointment UI (form control). Base Flatpickr styles come from appointment.min.css */


.ux-appointment-date .adx-card {
    background: #fff;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
    margin-bottom: 18px;
}

.ux-appointment-date .label.adx-label {
    color: #364153;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    margin-bottom: 8px;
    display: block;
}

.ux-appointment-date .date-input-wrapper {
    position: relative;
}

.ux-appointment-date .date-input.adx-date-input {
    width: 100%;
    height: 50px;
    border: 0.8px solid #D1D5DC;
    border-radius: 10px;
    padding: 12px 48px 12px 16px;
    font-size: 16px;
    outline: none;
    cursor: pointer;
    background: #fff;
}

.ux-appointment-date .calendar-icon {
    position: absolute;
    inset-inline-end: 14px;
    top: 50%;
    transform: translateY(-50%);
}

.ux-appointment-date .selected-date-box.adx-selected-date-box {
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 14px;
    background: #fafafa;
    margin-top: 12px;
}

.ux-appointment-date .selected-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ux-appointment-date .selected-title.adx-selected-title {
    color: #4A5565;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    margin-bottom: 4px;
}

.ux-appointment-date .change-date.adx-change-date {
    color: #314158;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    text-decoration-line: underline;
    cursor: pointer;
    border: none;
    background: none;
    white-space: nowrap;
}

.ux-appointment-date .selected-date-text.adx-selected-date-text {
    color: #101828;
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
}

.ux-appointment-date .flatpickr-calendar {
    width: 100% !important;
    max-width: 474px !important;
    background: #fff !important;
    border: none !important;
    border-radius: 14px !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .12) !important;
    padding: 18px !important;
}

.ux-appointment-date .flatpickr-months {
    margin-bottom: 12px;
}

.ux-appointment-date .flatpickr-current-month::before {
    content: "";
    display: inline-block;
    width: 32px;
    height: 32px;
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 10C0 4.47715 4.47715 0 10 0H30C35.5228 0 40 4.47715 40 10V30C40 35.5228 35.5228 40 30 40H10C4.47715 40 0 35.5228 0 30V10Z' fill='%23F1F5F9'/%3E%3Cpath d='M16.6667 11.6667V15' stroke='%231D293D' stroke-width='1.66667' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M23.3333 11.6667V15' stroke='%231D293D' stroke-width='1.66667' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M25.8333 13.3333H14.1667C13.2462 13.3333 12.5 14.0795 12.5 15V26.6667C12.5 27.5871 13.2462 28.3333 14.1667 28.3333H25.8333C26.7538 28.3333 27.5 27.5871 27.5 26.6667V15C27.5 14.0795 26.7538 13.3333 25.8333 13.3333Z' stroke='%231D293D' stroke-width='1.66667' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M12.5 18.3333H27.5' stroke='%231D293D' stroke-width='1.66667' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
}

.ux-appointment-date .flatpickr-current-month {
    font-size: 14px;
    font-weight: 500;
    height: 40px;
    padding: 0;
    inset-inline-start: 0;
    text-align: start;
}

.ux-appointment-date .numInputWrapper,
.ux-appointment-date .flatpickr-monthDropdown-months {
    top: -10px !important;
    padding-inline-start: 8px !important;
}

.ux-appointment-date .flatpickr-month {
    height: 40px;
}

.ux-appointment-date .flatpickr-prev-month,
.ux-appointment-date .flatpickr-next-month {
    top: 18px !important;
    width: 32px !important;
    height: 32px !important;
    background: #f3f4f6;
    border-radius: 8px;
    padding: 8px !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ux-appointment-date .flatpickr-prev-month:hover,
.ux-appointment-date .flatpickr-next-month:hover {
    background: #e5e7eb;
}

.ux-appointment-date .flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,
.ux-appointment-date .flatpickr-months .flatpickr-next-month.flatpickr-prev-month {
    inset-inline-end: 58px !important;
    left: unset !important;
}

.ux-appointment-date .flatpickr-months .flatpickr-prev-month.flatpickr-next-month,
.ux-appointment-date .flatpickr-months .flatpickr-next-month.flatpickr-next-month {
    inset-inline-end: 18px !important;
}

.ux-appointment-date .flatpickr-innerContainer,
.ux-appointment-date .flatpickr-rContainer {
    display: block;
}

.ux-appointment-date .flatpickr-weekdays {
    margin-bottom: 10px;
}

.ux-appointment-date .flatpickr-weekday {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #6b7280 !important;
}

.ux-appointment-date .flatpickr-days {
    width: 100% !important;
}

.ux-appointment-date .dayContainer {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.ux-appointment-date .flatpickr-day {
    width: 100% !important;
    max-width: 100% !important;
    height: 56px !important;
    line-height: 56px !important;
    border-radius: 10px !important;
    border: 1px solid #ececec !important;
    background: #fff;
    color: #111827;
    font-size: 14px;
    font-weight: 500;
    margin: 0 !important;
}

.ux-appointment-date .flatpickr-day:not(.flatpickr-disabled):hover {
    background: #f9fafb !important;
}

.ux-appointment-date .flatpickr-day.selected {
    background: #344b61 !important;
    border-color: #344b61 !important;
    color: #fff !important;
}

.ux-appointment-date .flatpickr-day.weekend-day {
    background: #f3f4f6 !important;
    border-color: #f3f4f6 !important;
    color: #9ca3af !important;
}

.ux-appointment-date .flatpickr-day.unavailable-day {
    background: #fff4f4 !important;
    border-color: #fecaca !important;
    color: #dc2626 !important;
}

.ux-appointment-date .flatpickr-day.holiday-day,
.ux-appointment-date .flatpickr-day.holiday-day.flatpickr-disabled {
    background: repeating-linear-gradient(45deg, #f3f4f6, #f3f4f6 6px, #dee0e4 6px, #dee0e4 9px) !important;
    border-color: #dee0e4 !important;
    color: #9197a3 !important;
}

.ux-appointment-date .flatpickr-day.flatpickr-disabled,
.ux-appointment-date .flatpickr-day.holiday-day.flatpickr-disabled,
.ux-appointment-date .flatpickr-day.unavailable-day.flatpickr-disabled,
.ux-appointment-date .flatpickr-day.weekend-day.flatpickr-disabled {
    cursor: not-allowed !important;
    pointer-events: none;
    opacity: 1 !important;
}

.ux-appointment-date .calendar-legend {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    padding-top: 18px;
    margin-top: 18px;
    border-top: 1px solid #f1f1f1;
}

.ux-appointment-date .legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #6b7280;
}

.ux-appointment-date .legend-color {
    width: 12px;
    height: 12px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.ux-appointment-date .time-card.adx-time-card {
    display: none;
}

.ux-appointment-date .time-header.adx-time-header {
    margin-bottom: 16px;
}

.ux-appointment-date .adx-time-heading {
    color: #101828;
    font-size: 18px;
    font-weight: 600;
    line-height: 28px;
    margin: 0;
}

.ux-appointment-date .time-date.adx-time-date {
    color: #4A5565;
    font-size: 14px;
    line-height: 20px;
}

.ux-appointment-date .time-slots.adx-time-slots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.ux-appointment-date .time-slot {
    position: relative;
}

.ux-appointment-date .time-slot input {
    display: none;
}

.ux-appointment-date .time-slot label {
    height: 45px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: .2s;
    border: 0.8px solid #E5E7EB;
    background: #F9FAFB;
    color: #101828;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
}

.ux-appointment-date .time-slot input:checked + label {
    background: #344b61;
    border-color: #344b61;
    color: #fff;
    font-weight: 600;
}

.ux-appointment-date .time-slot.disabled label {
    background: #f3f4f6;
    color: #b1b1b1;
    border-color: #e5e7eb;
    cursor: not-allowed;
    text-decoration: line-through;
}

.ux-appointment-date .adx-booked-badge {
    position: absolute;
    top: -6px;
    inset-inline-end: -4px;
    background: #dc2626;
    color: #fff;
    font-size: 9px;
    padding: 2px 5px;
    border-radius: 20px;
}

/* Arabic RTL: flatpickr base (appointment.min.css) sets direction: ltr on the calendar */
.flatpickr-calendar[dir="rtl"],
.flatpickr-calendar.flatpickr-rtl {
    direction: rtl !important;
}

.flatpickr-calendar[dir="rtl"] .flatpickr-weekdays .flatpickr-weekdaycontainer,
.flatpickr-calendar.flatpickr-rtl .flatpickr-weekdays .flatpickr-weekdaycontainer {
    display: flex !important;
    flex-direction: row-reverse !important;
}

.flatpickr-calendar[dir="rtl"] .dayContainer,
.flatpickr-calendar.flatpickr-rtl .dayContainer {
    direction: rtl !important;
}
