.ui-date {
    position: relative;
    width: 100%;
    min-width: 0;
    font-family: "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
}

.ui-date__input {
    width: 100%;
    min-height: 2.4rem;
    padding: 0.35rem 2.35rem 0.35rem 0.65rem;
    color: var(--default-text-color, #25272b);
    background: var(--custom-white, #fff);
    border: 1px solid var(--default-border, #dfe2e6);
    border-radius: 0.42rem;
    outline: 0;
    font: inherit;
    font-size: 0.8rem;
}

.ui-date__input:focus {
    border-color: rgba(var(--primary-rgb, 112, 82, 168), 0.62);
    box-shadow: 0 0 0 0.16rem rgba(var(--primary-rgb, 112, 82, 168), 0.1);
}

.proposal-form-page .ui-date__input:focus-visible {
    outline: 0;
}

.ui-date__input.is-invalid,
.ui-date.invalid .ui-date__input {
    border-color: #bd4650;
}

.ui-date__input:disabled {
    color: var(--text-muted, #70737a);
    background: rgb(var(--light-rgb, 245, 246, 248));
}

.ui-date__button {
    position: absolute;
    z-index: 1;
    top: 0;
    right: 0;
    display: grid;
    width: 2.35rem;
    height: 100%;
    place-items: center;
    padding: 0;
    color: var(--text-muted, #70737a);
    background: transparent;
    border: 0;
    border-radius: 0 0.42rem 0.42rem 0;
    font-size: 0.95rem;
}

.ui-date__button:hover:not(:disabled),
.ui-date__button:focus-visible {
    color: var(--default-text-color, #25272b);
    background: rgb(var(--light-rgb, 245, 246, 248));
    outline: 0;
}

.ui-date__backdrop {
    position: fixed;
    z-index: 1038;
    inset: 0;
    padding: 0;
    background: transparent;
    border: 0;
}

.ui-date__panel {
    position: fixed;
    z-index: 1040;
    width: 17rem;
    padding: 0.55rem;
    color: var(--default-text-color, #25272b);
    background: var(--custom-white, #fff);
    border: 1px solid #dde0e5;
    border-radius: 0.55rem;
    box-shadow: 0 0.8rem 2rem rgb(24 29 36 / 0.14);
    visibility: hidden;
}

.ui-date__panel.is-positioned {
    visibility: visible;
}

.ui-date__header {
    display: grid;
    min-height: 2.15rem;
    align-items: center;
    grid-template-columns: 2rem minmax(0, 1fr) 2rem;
    gap: 0.35rem;
}

.ui-date__header strong {
    overflow: hidden;
    font-size: 0.8rem;
    font-weight: 650;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ui-date__header button {
    display: grid;
    width: 2rem;
    height: 2rem;
    place-items: center;
    padding: 0;
    color: var(--text-muted, #70737a);
    background: transparent;
    border: 0;
    border-radius: 0.35rem;
}

.ui-date__header button:hover:not(:disabled),
.ui-date__header button:focus-visible {
    color: rgb(var(--primary-rgb, 112, 82, 168));
    background: rgba(var(--primary-rgb, 112, 82, 168), 0.08);
    outline: 0;
}

.ui-date__header button:disabled {
    opacity: 0.35;
}

.ui-date__weekdays,
.ui-date__days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.ui-date__weekdays {
    margin-top: 0.35rem;
    padding: 0.35rem 0 0.3rem;
    border-bottom: 1px solid var(--default-border, #dfe2e6);
}

.ui-date__weekdays span {
    color: var(--text-muted, #70737a);
    font-size: 0.6rem;
    font-weight: 650;
    text-align: center;
    text-transform: uppercase;
}

.ui-date__days {
    gap: 0.16rem;
    padding-top: 0.4rem;
}

.ui-date__day {
    display: grid;
    min-width: 0;
    height: 1.75rem;
    place-items: center;
    padding: 0;
    color: var(--default-text-color, #25272b);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 0.34rem;
    font-size: 0.7rem;
    font-weight: 550;
}

.ui-date__day:hover:not(:disabled),
.ui-date__day:focus-visible {
    background: #f3f4f6;
    outline: 0;
}

.ui-date__day.is-outside {
    color: #a0a4aa;
}

.ui-date__day.is-today {
    border-color: rgba(var(--primary-rgb, 112, 82, 168), 0.58);
}

.ui-date__day.is-selected {
    color: #fff;
    background: rgb(var(--primary-rgb, 112, 82, 168));
    border-color: rgb(var(--primary-rgb, 112, 82, 168));
}

.ui-date__day:disabled {
    color: #c3c6ca;
}

.ui-date__footer {
    display: flex;
    min-height: 2rem;
    align-items: end;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 0.35rem;
    padding: 0.4rem 0.15rem 0;
    border-top: 1px solid var(--default-border, #dfe2e6);
}

.ui-date__footer button {
    padding: 0.15rem;
    color: rgb(var(--primary-rgb, 112, 82, 168));
    background: transparent;
    border: 0;
    font-size: 0.68rem;
    font-weight: 650;
}

@media (max-width: 600px) {
    .ui-date__panel {
        max-width: calc(100vw - 1rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    .ui-date__input {
        scroll-behavior: auto;
    }
}
