/* MD-04 | V2 common date input visual owner.
   All calendar fields use this one component. Field-specific behavior may only
   change the opening anchor (e.g. DOB = today - 40 years), not the component. */
.md04-date-host {
    position: relative;
}

.md04-date-popover {
    position: absolute;
    z-index: 1000;
    top: calc(100% + 5px);
    left: 0;
    width: 286px;
    padding: 9px;
    border: 1px solid #bfcfd9;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 12px 35px rgba(25, 57, 76, .18);
}
.md04-date-popover[hidden] { display: none !important; }

.md04-date-popover__header {
    display: grid;
    grid-template-columns: 34px 1fr 34px;
    align-items: center;
    gap: 5px;
}
.md04-date-popover__header > button,
.md04-date-popover__footer button {
    border: 1px solid #d0dce3;
    background: #fff;
    border-radius: 6px;
    min-height: 30px;
    cursor: pointer;
}
.md04-date-popover__header > button:hover:not(:disabled),
.md04-date-popover__footer button:hover:not(:disabled) {
    background: #edf5f5;
}
.md04-date-popover__header > button:disabled,
.md04-date-popover__footer button:disabled {
    opacity: .35;
    cursor: not-allowed;
}

.md04-date-popover__title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 0;
}
.md04-date-popover__title-button,
.md04-date-popover__mode-title-button {
    border: 0;
    border-radius: 6px;
    background: transparent;
    min-height: 30px;
    padding: 0 5px;
    color: #153f55;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
}
.md04-date-popover__title-button:hover,
.md04-date-popover__mode-title-button:hover {
    background: #e8f5f3;
}
.md04-date-popover__mode-title {
    text-align: center;
    font-size: 13px;
    color: #153f55;
}

.md04-date-popover__week,
.md04-date-popover__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}
.md04-date-popover__week { margin-top: 7px; }
.md04-date-popover__week span {
    text-align: center;
    font-size: 10px;
    color: #7a8994;
    padding: 3px 0;
}
.md04-date-popover__day {
    height: 31px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #24465d;
    cursor: pointer;
    font-size: 11.5px;
}
.md04-date-popover__day:hover:not(:disabled),
.md04-date-popover__day.is-active {
    background: #e8f5f3;
    outline: 1px solid #9fd1c5;
}
.md04-date-popover__day.is-selected { background: #0e7680; color: #fff; }
.md04-date-popover__day.is-other-month { color: #aab5bc; }
.md04-date-popover__day:disabled { opacity: .3; cursor: not-allowed; }

.md04-date-popover__picker-grid {
    display: grid;
    gap: 5px;
    margin-top: 9px;
}
.md04-date-popover__picker-grid--years { grid-template-columns: repeat(4, 1fr); }
.md04-date-popover__picker-grid--months { grid-template-columns: repeat(3, 1fr); }
.md04-date-popover__picker-option {
    min-height: 34px;
    padding: 0 4px;
    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;
    color: #24465d;
    cursor: pointer;
    font-size: 11.5px;
}
.md04-date-popover__picker-option:hover:not(:disabled) {
    border-color: #9fd1c5;
    background: #e8f5f3;
}
.md04-date-popover__picker-option.is-current {
    border-color: #74b9ad;
    background: #e8f5f3;
    color: #0b6973;
    font-weight: 700;
}
.md04-date-popover__picker-option:disabled {
    opacity: .3;
    cursor: not-allowed;
}

.md04-date-popover__footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 7px;
}
.md04-date-popover__footer button {
    padding: 0 10px;
    color: #0b6973;
    font-weight: 700;
}
