.history-date-modal[hidden],
.history-manual-panel[hidden],
.history-calendar-panel[hidden],
.history-date-icon-button[hidden] {
    display: none !important
}

.history-date-modal {
    position: fixed;
    inset: 0;
    z-index: 100
}

.history-date-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .5)
}

.history-date-dialog {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(calc(100% - 64px), 360px);
    max-height: calc(100vh - 48px);
    transform: translate(-50%, -50%);
    overflow: auto;
    border-radius: 30px;
    background: #fff;
    color: #111;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .2)
}

.history-date-head {
    padding: 22px 26px 16px;
    border-bottom: 1px solid #222
}

.history-date-title {
    font-size: 15px;
    font-weight: 500
}

.history-date-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 26px
}

.history-date-summary {
    font-size: 32px;
    line-height: 1.15;
    font-weight: 400;
    letter-spacing: -.02em
}

.history-date-icon-button {
    display: flex;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: #111;
    padding: 5px
}

.history-date-icon-button svg {
    width: 26px;
    height: 26px;
    fill: currentColor
}

.history-calendar-panel {
    padding: 18px 26px 10px
}

.history-calendar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px
}

.history-month-label {
    border: 0;
    background: transparent;
    padding: 0;
    color: #444;
    font-size: 15px;
    font-weight: 500
}

.history-month-actions {
    display: flex;
    gap: 20px
}

.history-month-actions button {
    border: 0;
    background: transparent;
    color: #666;
    font-size: 32px;
    line-height: 1;
    padding: 0 2px
}

.history-weekdays,
.history-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center
}

.history-weekdays span {
    padding: 10px 0 9px;
    font-size: 15px
}

.history-calendar-days {
    row-gap: 4px
}

.history-calendar-day {
    position: relative;
    display: flex;
    aspect-ratio: 1;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #111;
    font-size: 16px
}

.history-calendar-day.is-outside {
    visibility: hidden
}

.history-calendar-day.is-selected {
    background: var(--app_secondary, #ffeb3c)
}

.history-calendar-day.is-today:not(.is-selected) {
    box-shadow: inset 0 0 0 1px var(--app_secondary, #ffeb3c)
}

.history-calendar-day.is-future {
    color: #999
}

.history-manual-panel {
    padding: 18px 26px 8px
}

.history-input-wrap {
    position: relative;
    display: block;
    border: 2px solid var(--app_secondary, #ffeb3c);
    border-radius: 5px;
    padding: 17px 12px 12px
}

.history-input-wrap span {
    position: absolute;
    left: 10px;
    top: -11px;
    background: #fff;
    padding: 0 4px;
    color: #c2b400;
    font-size: 14px
}

.history-input-wrap input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #111;
    font-size: 19px;
    letter-spacing: .02em
}

.history-date-error {
    margin: 8px 2px 0;
    color: #c62828;
    font-size: 12px
}

.history-date-actions {
    display: flex;
    justify-content: flex-end;
    gap: 34px;
    padding: 14px 28px 24px
}

.history-date-actions button {
    border: 0;
    background: transparent;
    color: #d4c300;
    font-size: 15px;
    font-weight: 700
}

.history-no-results {
    padding: 48px 16px;
    text-align: center;
    color: #666
}

.history-filtered-out {
    display: none !important
}

@media(max-width:420px) {
    .history-date-dialog {
        width: calc(100% - 56px)
    }

    .history-date-summary {
        font-size: 30px
    }
}