/* Поле даты (date-input.js): ввод по маске дд.мм.гггг, календарь по кнопке справа. */

.gdi {
    position: relative;
    display: block;
}

.gdi > input.form-control {
    padding-right: 40px;
    font-variant-numeric: tabular-nums;
}

.gdi-btn {
    position: absolute;
    top: 50%;
    right: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 30px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: #5E6B76;
    font-size: 19px;
    line-height: 1;
    transform: translateY(-50%);
    cursor: pointer;
}

.gdi-btn:hover,
.gdi.is-open .gdi-btn {
    background: #E6F0F6;
    color: #006196;
}

.gdi-btn:focus-visible {
    outline: 2px solid #006196;
    outline-offset: 1px;
}

.gdi.is-invalid-date > input.form-control {
    border-color: #D92D20;
}

.gdi.is-invalid-date::after {
    content: "Такой даты нет — введите в формате дд.мм.гггг";
    display: block;
    margin-top: 3px;
    color: #B42318;
    font-size: 12px;
}

/* ---------- Календарь ---------- */

.gdi-pop {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 1060;
    width: 296px;
    padding: 10px;
    background: #FFF;
    border: 1px solid #D9E0E6;
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(16, 38, 66, .16);
}

.gdi-pop.is-up {
    top: auto;
    bottom: calc(100% + 6px);
}

.gdi-pop__head {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.gdi-nav {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    background: #FFF;
    border: 1px solid #D9E0E6;
    border-radius: 6px;
    color: #15212B;
    font-size: 18px;
    cursor: pointer;
}

.gdi-nav:hover {
    border-color: #006196;
    color: #006196;
}

.gdi-sel {
    flex: 1 1 auto;
    min-width: 0;
    height: 30px;
    padding: 0 6px;
    background: #FFF;
    border: 1px solid #D9E0E6;
    border-radius: 6px;
    color: #15212B;
    font-size: 13.5px;
    font-weight: 600;
}

.gdi-sel[data-gdi-year] {
    flex: 0 0 74px;
}

.gdi-sel:focus {
    border-color: #006196;
    outline: 0;
}

.gdi-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.gdi-dow {
    padding: 4px 0;
    color: #5E6B76;
    font-size: 11.5px;
    font-weight: 600;
    text-align: center;
}

.gdi-dow.is-weekend {
    color: #B42318;
}

.gdi-day {
    height: 34px;
    padding: 0;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    color: #15212B;
    font-size: 13.5px;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
}

.gdi-day.is-weekend {
    color: #B42318;
}

.gdi-day.is-out {
    color: #B0BAC3;
}

.gdi-day:hover {
    background: #EEF4F8;
}

.gdi-day:focus-visible {
    outline: 2px solid #006196;
    outline-offset: -1px;
}

.gdi-day.is-today {
    border-color: #006196;
    font-weight: 600;
}

.gdi-day.is-selected,
.gdi-day.is-selected:hover {
    background: #006196;
    border-color: #006196;
    color: #FFF;
    font-weight: 600;
}

.gdi-pop__foot {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #EDF1F4;
}

.gdi-link {
    padding: 2px 4px;
    background: none;
    border: 0;
    color: #006196;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.gdi-link:hover {
    text-decoration: underline;
}

.gdi-link--muted {
    color: #5E6B76;
}
