/* Shared native date inputs hide browser-specific empty text behind one localized placeholder. */
.ratio-date-input {
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
}

.ratio-date-input input[type="date"] {
    position: relative;
    z-index: 1;
    width: 100%;
    padding-right: 36px;
    background: #fff;
    font-weight: 450;
    cursor: text;
}

.ratio-date-input input[type="date"]:disabled,
.ratio-date-input input[type="date"]:read-only {
    cursor: not-allowed;
}

/* Invalid calendar boundaries use the shared danger palette without changing field geometry. */
.ratio-date-input.is-invalid input[type="date"] {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(201, 66, 66, 0.1);
}

.ratio-date-input-error {
    display: block;
    margin: 5px 0 0;
    color: var(--danger);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.4;
}

/* The invisible native indicator retains its picker behavior below one shared icon. */
.ratio-date-input input[type="date"]::-webkit-calendar-picker-indicator {
    position: absolute;
    z-index: 4;
    top: 0;
    right: 0;
    width: 36px;
    height: 100%;
    margin: 0;
    padding: 0;
    cursor: pointer;
    opacity: 0;
}

.ratio-date-input-icon {
    position: absolute;
    z-index: 3;
    top: 0;
    right: 0;
    bottom: 0;
    display: grid;
    width: 36px;
    place-items: center;
    color: var(--navy-900);
    pointer-events: none;
}

.ratio-date-input-icon svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ratio-date-input-placeholder {
    position: absolute;
    z-index: 0;
    top: 0;
    right: 36px;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    padding: 0 12px;
    color: var(--muted);
    font: inherit;
    font-size: 13px;
    font-weight: 400;
    line-height: 1;
    pointer-events: none;
    opacity: 0;
}

.ratio-date-input.is-empty:not(:focus-within) .ratio-date-input-placeholder {
    z-index: 2;
    opacity: 1;
}

.ratio-date-input.is-empty:not(:focus-within) input[type="date"] {
    color: transparent;
}

.ratio-date-input.is-empty:not(:focus-within) input[type="date"]::-webkit-datetime-edit,
.ratio-date-input.is-empty:not(:focus-within) input[type="date"]::-webkit-datetime-edit-fields-wrapper,
.ratio-date-input.is-empty:not(:focus-within) input[type="date"]::-webkit-datetime-edit-text,
.ratio-date-input.is-empty:not(:focus-within) input[type="date"]::-webkit-datetime-edit-month-field,
.ratio-date-input.is-empty:not(:focus-within) input[type="date"]::-webkit-datetime-edit-day-field,
.ratio-date-input.is-empty:not(:focus-within) input[type="date"]::-webkit-datetime-edit-year-field {
    color: transparent;
    -webkit-text-fill-color: transparent;
}
