.app-date-picker {
    position: relative;
    width: 100%;
    min-width: 0;
}

.app-date-picker-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-align: left;
    cursor: default;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.app-date-picker-trigger.form-control {
    background: #fff;
}

.app-date-picker-trigger:hover:not(.is-disabled) {
    border-color: #aebfB8;
}

.app-date-picker-trigger:focus-within,
.app-date-picker-trigger.is-open {
    border-color: #80a596;
    box-shadow: 0 0 0 .2rem rgba(23, 75, 59, .11);
    outline: 0;
}

.app-date-picker-trigger.is-invalid {
    border-color: var(--bs-form-invalid-border-color);
}

.app-date-picker-trigger.is-invalid:focus-within,
.app-date-picker-trigger.is-invalid.is-open {
    box-shadow: 0 0 0 .2rem rgba(220, 53, 69, .12);
}

.app-date-picker-input {
    min-width: 0;
    flex: 1 1 auto;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #26352f;
    font: inherit;
    line-height: inherit;
    cursor: text;
}

.app-date-picker-input::placeholder {
    color: #8a9691;
    font-weight: 400;
    opacity: 1;
}

.app-date-picker-input:disabled {
    cursor: not-allowed;
}

.app-date-picker-open {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #64756e;
    cursor: pointer;
}

.app-date-picker-open:hover:not(:disabled),
.app-date-picker-open:focus-visible {
    background: #edf4f1;
    color: var(--brand);
    outline: 0;
}

.app-date-picker-open:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.app-date-picker-open > i {
    font-size: 15px;
}

.app-date-picker-trigger.is-disabled {
    background-color: var(--bs-secondary-bg, #e9ecef);
    opacity: 1;
}

.app-date-picker-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1085;
    width: 100vw;
    height: 100vh;
    padding: 0;
    border: 0;
    background: rgba(13, 38, 30, .08);
    cursor: default;
}

.app-date-picker-popover {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 1090;
    width: 326px;
    max-width: calc(100vw - 28px);
    overflow: hidden;
    border: 1px solid #dce5e1;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(18, 45, 36, .18), 0 3px 10px rgba(18, 45, 36, .08);
    transform: translate(-50%, -50%);
}

.app-date-picker-popover.align-end {
    right: auto;
}

.app-date-picker-popover.with-time {
    width: 510px;
    display: grid;
    grid-template-columns: minmax(0, 326px) minmax(170px, 1fr);
}

.app-date-picker-main {
    padding: 14px 14px 10px;
}

.app-date-picker-header {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    margin-bottom: 8px;
}

.app-date-picker-period {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 92px;
    gap: 6px;
    min-width: 0;
}

.app-date-picker-period .app-form-select {
    min-width: 0;
}

.app-date-picker-period .app-form-select.compact .cashiering-select-trigger {
    height: 34px;
    min-height: 34px;
    padding: 4px 8px;
    border-color: #dce5e1;
    border-radius: 9px;
}

.app-date-picker-period .app-form-select.compact .cashiering-select-trigger-copy strong {
    color: #24352f;
    font-size: 13px;
    font-weight: 700;
}

.app-date-picker-period .app-form-select.compact .cashiering-select-menu {
    min-width: 100%;
    max-height: 250px;
}

.app-date-picker-period .app-date-picker-month-select .cashiering-select-menu {
    min-width: 150px;
}

.app-date-picker-year-select {
    font-variant-numeric: tabular-nums;
}

.app-date-picker-nav {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: #52645d;
}

.app-date-picker-nav:hover,
.app-date-picker-nav:focus-visible {
    border-color: #d8e2de;
    background: #f4f7f5;
    outline: 0;
}

.app-date-picker-nav:disabled {
    color: #b6c0bc;
    cursor: not-allowed;
    opacity: .55;
}

.app-date-picker-weekdays,
.app-date-picker-calendar {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.app-date-picker-weekdays {
    margin-bottom: 3px;
}

.app-date-picker-weekdays span {
    height: 28px;
    display: grid;
    place-items: center;
    color: #8a9691;
    font-size: 11px;
    font-weight: 750;
    text-transform: uppercase;
}

.app-date-picker-calendar {
    gap: 2px;
}

.app-date-picker-day {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    min-height: 36px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #26352f;
    font-size: 13px;
    font-weight: 600;
}

.app-date-picker-day:hover:not(:disabled),
.app-date-picker-day:focus-visible {
    background: #edf4f1;
    color: var(--brand-dark);
    outline: 0;
}

.app-date-picker-day.other-month {
    color: #b0bab6;
    font-weight: 500;
}

.app-date-picker-day.today:not(.selected)::after {
    content: "";
    position: absolute;
    bottom: 4px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--gold);
}

.app-date-picker-day.selected {
    background: var(--brand);
    color: #fff;
    font-weight: 750;
    box-shadow: 0 4px 10px rgba(23, 75, 59, .18);
}

.app-date-picker-day:disabled {
    color: #c7cfcc;
    background: transparent;
    cursor: not-allowed;
    opacity: .58;
}

.app-date-picker-time-panel {
    padding: 18px 16px;
    border-left: 1px solid #e3e9e6;
    background: #f8faf9;
}

.app-date-picker-time-heading {
    margin-bottom: 15px;
}

.app-date-picker-time-heading span,
.app-date-picker-time-fields label > span {
    display: block;
    color: #83908b;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.app-date-picker-time-heading strong {
    display: block;
    margin-top: 2px;
    color: #22342d;
    font-size: 18px;
    font-weight: 750;
}

.app-date-picker-time-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.app-date-picker-time-fields label {
    min-width: 0;
}

.app-date-picker-time-fields .app-form-select {
    margin-top: 4px;
}

.app-date-picker-time-fields .app-form-select.compact .cashiering-select-trigger {
    height: 40px;
    min-height: 40px;
    padding: 5px 8px;
}

.app-date-picker-time-fields .app-form-select.compact .cashiering-select-trigger-copy strong {
    font-weight: 650;
}

.app-date-picker-time-fields .app-form-select.compact .cashiering-select-menu {
    min-width: 100%;
    max-height: 220px;
}

.app-date-picker-meridiem {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
    margin-top: 10px;
    padding: 4px;
    border: 1px solid #dce5e1;
    border-radius: 10px;
    background: #fff;
}

.app-date-picker-meridiem button {
    min-height: 34px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #61716b;
    font-size: 12px;
    font-weight: 750;
}

.app-date-picker-meridiem button:hover,
.app-date-picker-meridiem button:focus-visible {
    background: #edf4f1;
    outline: 0;
}

.app-date-picker-meridiem button.active {
    background: var(--brand);
    color: #fff;
}

.app-date-picker-footer {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-top: 1px solid #e3e9e6;
    background: #fff;
}

.app-date-picker-footer-start,
.app-date-picker-footer-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.app-date-picker-footer .btn {
    min-height: 36px;
    padding: 6px 12px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
}

.app-date-picker-link {
    padding-right: 8px !important;
    padding-left: 8px !important;
    color: var(--brand) !important;
    text-decoration: none !important;
}

.app-date-picker-link:disabled {
    color: #aeb8b4 !important;
}

.app-date-picker--compact .app-date-picker-trigger {
    min-height: 30px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    font-size: 14px;
    font-weight: 650;
}

.app-date-picker--compact .app-date-picker-trigger:hover,
.app-date-picker--compact .app-date-picker-trigger:focus-within,
.app-date-picker--compact .app-date-picker-trigger.is-open {
    border: 0;
    background: transparent;
    box-shadow: none;
}

.app-date-picker--compact .app-date-picker-open {
    width: 24px;
    height: 24px;
}

.app-date-picker--compact .app-date-picker-open > i {
    font-size: 13px;
}

@media (max-width: 620px) {
    .app-date-picker-popover.with-time {
        width: min(360px, calc(100vw - 24px));
        display: block;
    }

    .app-date-picker-time-panel {
        border-top: 1px solid #e3e9e6;
        border-left: 0;
    }

    .app-date-picker-popover {
        width: min(326px, calc(100vw - 24px));
    }

    .app-date-picker-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .app-date-picker-footer-start,
    .app-date-picker-footer-actions {
        justify-content: space-between;
    }

    .app-date-picker-footer-actions .btn {
        flex: 1 1 0;
    }
}


/* Existing compact/report/accounting hosts keep their established dimensions. */
.reports-period .app-date-picker {
    width: auto;
    min-width: 150px;
}

.reports-period .app-date-picker .reports-date {
    width: 100%;
}

.accounting-date-filter .accounting-date-filter-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.accounting-date-filter .accounting-date-filter-trigger {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: transparent;
    box-shadow: none;
}

.accounting-date-filter .accounting-date-filter-trigger > * {
    opacity: 0;
}

.accounting-date-filter .accounting-date-filter-trigger:focus-within,
.accounting-date-filter .accounting-date-filter-trigger.is-open {
    border: 0;
    box-shadow: inset 0 0 0 2px rgba(23, 75, 59, .18);
}

@media (max-width: 760px) {
    .reports-period .app-date-picker {
        flex: 1 1 0;
        min-width: 0;
    }
}

/* AppFormSelect menus inside the date picker must layer beyond the compact picker shell. */
.app-date-picker-popover:has(.app-form-select.open) {
    overflow: visible;
}

.app-date-picker-popover .cashiering-select-dismiss {
    z-index: 1095;
}

.app-date-picker-popover .cashiering-select-menu {
    z-index: 1100;
}
