.date-format-widget {
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
}

.date-format-widget > .date-format-display {
    display: block;
    width: 100%;
    min-width: 0;
    padding-right: 42px !important;
}

.date-format-picker {
    position: absolute;
    top: 50%;
    right: 8px;
    z-index: 1;
    display: inline-flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #495057;
    cursor: pointer;
    transform: translateY(-50%);
}

.date-format-picker:hover:not(:disabled) {
    background: #eaf3fb;
}

.date-format-picker svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
}

.date-format-picker:focus-visible,
.date-format-calendar button:focus-visible {
    outline: 2px solid #2878c8;
    outline-offset: 1px;
    z-index: 1;
}

.date-format-picker:disabled {
    cursor: not-allowed;
    opacity: .65;
}

.date-format-calendar {
    position: fixed;
    z-index: 10000;
    width: 300px;
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 16px);
    overflow-y: auto;
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
    color: #24292f;
}

.date-format-calendar__header {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-bottom: 8px;
}

.date-format-calendar__selectors {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    gap: 3px;
    min-width: 0;
}

.date-format-calendar__control {
    box-sizing: border-box;
    height: 30px;
    min-width: 0;
    padding: 4px 18px 4px 7px;
    border: 1px solid #d0d7de;
    border-radius: 4px;
    background: #fff;
    color: inherit;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.date-format-calendar__month {
    flex: 1 1 0;
}

.date-format-calendar__year {
    flex: 0 0 80px;
    width: 80px;
    text-align: center;
}

.date-format-calendar__nav,
.date-format-calendar__day {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 30px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.date-format-calendar__nav {
    flex: 0 0 26px;
    min-width: 26px;
    font-size: 22px;
    line-height: 1;
}

.date-format-calendar__control:focus-visible,
.date-format-calendar__nav:hover,
.date-format-calendar__day:hover:not(:disabled) {
    background: #eaf3fb;
}

.date-format-calendar__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    text-align: center;
}

.date-format-calendar__weekday {
    padding: 5px 0;
    color: #656d76;
    font-size: 12px;
    font-weight: 600;
}

.date-format-calendar__day.is-selected {
    background: #2878c8;
    color: #fff;
}

.date-format-calendar__day:disabled {
    color: #aeb5bd;
    cursor: not-allowed;
}

@media (max-width: 575px) {
    .date-format-calendar {
        width: min(276px, calc(100vw - 32px));
    }

    .date-format-calendar__year {
        flex-basis: 72px;
        width: 72px;
    }

    .date-format-calendar__nav {
        flex-basis: 26px;
        min-width: 26px;
    }
}
