
:root {

    --body: #fff;
    --black: #111;
    --black-100: #B5B5B5;
    --white: #fff;

    --theme: #F15A29;
    --theme-2: #DCFCE7;

    --red-100: #FFF6F4;
    --red-200: #F9B39D;
    --red-300: #F69070;
    --black-400: #414141;
    --red-500: #F15A29;

    --header-color: #241442;
    --title-color: #131313;
    --text-color: #525252;
    --text-color-2: #F8FAF0;
    --text-color-3: #F5E4DF;
    --text-color-4: #E6E6E6;
    --text-color-5: #4A5565;
    --btn-text: #252525;
    --pra-text: #464646;

    --orange: #F74F22;
    --gray1: #F6F8F0;

    --border: #D0D0D0;
    --border-2: #E5E7EB;
    --shadow-text: #AFAFAF;



    --box-shadow: 0px 4px 25px 0px rgba(0, 0, 0, 0.06);

    --font-primary: "Inter", sans-serif;
    --font-body: "Inter", sans-serif;

    --fa: "Font Awesome 6 Pro";
}

.datepicker-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

[x-cloak] {
    display: none !important;
}

.datepicker-overlay .datepicker-container {
    background: white;
    border-radius: 28px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.24);
    overflow: hidden;
    width: 100%;
    max-width: 490px;
    display: flex;
    transform-origin: center;
    animation: pickerAppear 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes pickerAppear {
    from {
        transform: scale(0.9) translateY(20px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.datepicker-overlay .selected-date {
    background: linear-gradient(135deg, var(--theme) 0%, var(--theme-2) 100%);
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 180px;
    max-width: 205px;
    position: relative;
}

.datepicker-overlay .selected-date-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 16px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.datepicker-overlay .selected-date-display {
    font-size: 42px;
    font-weight: 400;
    color: white;
    line-height: 1.1;
    letter-spacing: -0.5px;
}



.datepicker-overlay .calendar-section {
    flex: 1;
    padding: 32px 28px 28px;
    background: #fafafa;
    position: relative;
}

.datepicker-overlay .calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.datepicker-overlay .month-year {
    font-size: 16px;
    font-weight: 600;
    color: #3c4043;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 8px;
    transition: background 0.2s;
}

.datepicker-overlay .month-year:hover {
    background: rgba(0, 0, 0, 0.04);
}

.datepicker-overlay .dropdown-icon {
    transition: transform 0.2s;
}

.datepicker-overlay .year-month-dropdown {
    position: absolute;
    top: 70px;
    left: 28px;
    right: 28px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 100;
    max-height: 320px;
    overflow-y: auto;
    padding: 8px;
}

.datepicker-overlay .year-month-dropdown::-webkit-scrollbar {
    width: 8px;
}

.datepicker-overlay .year-month-dropdown::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.datepicker-overlay .year-month-dropdown::-webkit-scrollbar-thumb {
    background: #c0c0c0;
    border-radius: 4px;
}

.datepicker-overlay .year-month-dropdown::-webkit-scrollbar-thumb:hover {
    background: #a0a0a0;
}

.datepicker-overlay .dropdown-section {
    margin-bottom: 16px;
}

.datepicker-overlay .dropdown-section:last-child {
    margin-bottom: 0;
}

.datepicker-overlay .dropdown-section-title {
    font-size: 11px;
    font-weight: 700;
    color: #70757a;
    padding: 8px 12px 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.datepicker-overlay .dropdown-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.datepicker-overlay .dropdown-item {
    padding: 10px;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #202124;
    transition: all 0.2s;
    font-weight: 500;
}

.datepicker-overlay .dropdown-item:hover {
    background: #e8f0fe;
}

.datepicker-overlay .dropdown-item.selected {
    background: #1a73e8;
    color: white;
    font-weight: 600;
}

.datepicker-overlay .dropdown-item.disabled {
    color: #dadce0;
    cursor: not-allowed;
    background: transparent;
}

.datepicker-overlay .dropdown-item.disabled:hover {
    background: transparent;
}

.datepicker-overlay .nav-buttons {
    display: flex;
    gap: 4px;
}

.datepicker-overlay .nav-btn {
    background: white;
    border: 1px solid #e0e0e0;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    color: #5f6368;
    transition: all 0.2s;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.datepicker-overlay .nav-btn:hover {
    background: #f8f9fa;
    border-color: #d0d0d0;
    transform: scale(1.05);
}

.datepicker-overlay .nav-btn:active {
    transform: scale(0.95);
}

.datepicker-overlay .nav-btn:disabled {
    cursor: not-allowed;
    background: #f8f9fa;
    border-color: #e0e0e0;
    transform: none;
}

.datepicker-overlay .calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.datepicker-overlay .day-header {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: #70757a;
    padding: 10px 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.datepicker-overlay .day-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #202124;
    transition: all 0.2s;
    position: relative;
    font-weight: 500;
}

.datepicker-overlay .day-cell:hover:not(.disabled):not(.other-month) {
    background: #e8f0fe;
    transform: scale(1.1);
}



.datepicker-overlay .day-cell.selected:hover {
    background: #1557b0;
    color: #202124;
}

.datepicker-overlay .day-cell.selected {
    color: white!important;
    font-weight: 600;
    background: var(--theme)!important;
    box-shadow: 0 4px 12px rgba(241, 90, 41, 0.4);
    transform: scale(1.05);
    z-index: 2;
}

.datepicker-overlay .day-cell.range-start {
    background: var(--theme) !important;
    color: white !important;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.datepicker-overlay .day-cell.range-end {
    background: var(--theme) !important;
    color: white !important;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.datepicker-overlay .day-cell.in-range {
    background: rgba(var(--primary-color-rgb, 241, 90, 41), 0.15) !important;
    border-radius: 0;
}

.datepicker-overlay .day-cell.today:not(.selected) {
    background: #fff3e0;
    color: #e65100;
    font-weight: 600;
}

.datepicker-overlay .day-cell.today:not(.selected):hover {
    background: #ffe0b2;
}

.datepicker-overlay .day-cell.other-month {
    color: #bdc1c6;
    cursor: pointer;
}

.datepicker-overlay .day-cell.other-month:hover {
    background: transparent;
    transform: none;
}

.datepicker-overlay .day-cell.disabled {
    color: #dadce0;
    cursor: not-allowed;
    background: transparent;
}

.datepicker-overlay .day-cell.disabled:hover {
    transform: none;
}

.datepicker-overlay .footer-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
}

.datepicker-overlay .btn {
    padding: 10px 28px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.datepicker-overlay .btn-cancel {
    background: transparent;
    color: var(--theme);
}

.datepicker-overlay .btn-cancel:hover {
    background: rgb(var(--theme), 0.1);
}

.datepicker-overlay .btn-cancel:active {
    background: rgb(var(--theme), 0.2);
}

.datepicker-overlay .btn-ok {
    color: white;
    background: var(--theme);
    box-shadow: 0 4px 12px rgb(var(--theme), 0.4);
}

.datepicker-overlay .btn-ok:hover {
    background: rgb(var(--theme), 0.8);
    box-shadow: 0 4px 12px rgb(var(--theme), 0.4);
    transform: translateY(-1px);
}

.datepicker-overlay .btn-ok:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgb(var(--theme), 0.3);
    color: rgb(var(--white));
}

@media (max-width: 640px) {
    .datepicker-overlay .datepicker-container {
        flex-direction: column;
        max-width: 350px;
    }

    .datepicker-overlay .time-box {
        width: 80px !important;
        height: 80px !important;
    }

    .datepicker-overlay .time-input-field {
        font-size: 32px !important;
    }


    .datepicker-overlay .selected-date {
        min-width: auto;
        padding: 28px 24px;
        max-width: 100%;
    }

    .datepicker-overlay .footer-buttons {
        margin-top: 10px;
        padding-top: 0;
    }

    .datepicker-overlay .selected-date-display {
        font-size: 30px;
    }

    .datepicker-overlay .edit-icon {
        bottom: 24px;
        left: 24px;
    }

    .datepicker-overlay .calendar-section {
        padding: 24px 20px 20px;
    }

    .datepicker-overlay .calendar-grid {
        padding: 12px;
    }

    .datepicker-overlay .calendar-header {
        margin-bottom: 10px;
    }

    .datepicker-overlay .day-cell {
        font-size: 13px;
    }
}

@media (max-width: 425px) {
    .datepicker-overlay {
        padding: 10px;
    }

    .fm-header,
    .fm-body {
        padding: 1.5rem .9rem;
    }

    .fm-footer {
        padding: 1.5rem .5rem;
        justify-content: center;
    }
}

/* Time Picker Design - Material 3 Style */
.datepicker-overlay .time-picker-section {
    padding: 24px;
    background: #ffffff;
    border-radius: 28px;
}

.datepicker-overlay .time-picker-header {
    font-size: 14px;
    font-weight: 500;
    color: #484649;
    margin-bottom: 20px;
}

.datepicker-overlay .digital-display {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 12px;
    margin-bottom: 36px;
}

.datepicker-overlay .time-box-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.datepicker-overlay .time-box {
    width: 96px;
    height: 80px;
    background: #f4f3f7;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.datepicker-overlay .time-box.active {
    background: rgba(241, 90, 41, 0.15);
}

.datepicker-overlay .time-box.active .time-input-field {
    color: var(--theme);
}

.datepicker-overlay .time-input-field {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 45px;
    font-weight: 400;
    color: #1d1b20;
    padding: 0;
    margin: 0;
    cursor: pointer;
    -moz-appearance: textfield;
    appearance: textfield;
}

.datepicker-overlay .time-input-field::-webkit-outer-spin-button,
.datepicker-overlay .time-input-field::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.datepicker-overlay .time-input-field:focus {
    outline: none;
}

.datepicker-overlay .time-separator-dots {
    font-size: 45px;
    color: #1d1b20;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px;
}

.datepicker-overlay .am-pm-toggle {
    display: flex;
    flex-direction: column;
    border: 1px solid #ededed;
    border-radius: 8px;
    overflow: hidden;
    height: 80px;
}

.datepicker-overlay .am-pm-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 500;
    color: #49454f;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.datepicker-overlay .am-pm-btn.active {
    background: rgba(241, 90, 41, 0.15);
    color: var(--theme);
}



/* Clock Face */
.datepicker-overlay .clock-face-container {
    display: flex;
    justify-content: center;
    padding: 12px 0;

}

.datepicker-overlay .clock-face {
    width: 100%;
    min-width: 256px;
    max-width: 256px;
    height: 256px;
    background: #f4f3f7;
    border-radius: 50%;
    position: relative;
}

.datepicker-overlay .clock-center {
    width: 6px;
    height: 6px;
    background: var(--theme);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.datepicker-overlay .clock-hand {
    position: absolute;
    bottom: 50%;
    left: 50%;
    width: 2px;
    height: 92px;
    background: var(--theme);
    transform-origin: bottom center;
    transition: transform 0.2s cubic-bezier(0, 0, 0.2, 1);
    z-index: 10;
}

.datepicker-overlay .clock-hand-circle {
    position: absolute;
    top: -24px;
    left: 50%;
    width: 48px;
    height: 48px;
    background: var(--theme);
    border-radius: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    border: 2px solid white;
    /* Adds contrast against dial numbers */
}

.datepicker-overlay .hand-value {
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
}

.datepicker-overlay .clock-number {
    position: absolute;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #1d1b20;
    cursor: pointer;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    transition: all 0.2s;
}


.datepicker-overlay .clock-number.selected {
    color: #ffffff;
}

.datepicker-overlay .clock-number:hover:not(.selected) {
    background: rgba(0, 0, 0, 0.05);
}

/* Footer Buttons */
.datepicker-overlay .footer-buttons {
    margin-top: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px;
}

.datepicker-overlay .keyboard-icon {
    color: #484649;
}

.datepicker-overlay .footer-right {
    display: flex;
    justify-content: end;
    gap: 8px;
    width: 100%;
}

.datepicker-overlay .btn-cancel,
.datepicker-overlay .btn-ok {
    font-size: 14px;
    font-weight: 500;
    color: var(--theme);
    background: transparent;
    border: none;
    padding: 10px 16px;
    border-radius: 20px;
    cursor: pointer;
    text-transform: capitalize;
}

.datepicker-overlay .btn-ok:hover,
.datepicker-overlay .btn-cancel:hover {
    background: rgb(var(--theme), 0.08);
}

@media (max-width: 425px) {
    .datepicker-overlay .calendar-section {
        padding: 24px 10px 20px;
    }


    .datepicker-overlay .time-box {
        width: 65px !important;
        height: 65px !important;
    }

    .datepicker-overlay .digital-display {
        align-items: center;
    }

    .datepicker-overlay .am-pm-toggle {
        border: 1px solid #ededed;
        height: 63px;
    }

    .datepicker-overlay .am-pm-btn {
        padding: 0 6px;
    }
}