.erp-date-picker {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    max-width: 100%;
}

.erp-date-picker > input[type="date"],
.erp-date-picker > input[type="datetime-local"] {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0;
    pointer-events: none;
}

.erp-date-picker__trigger {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.erp-date-picker__empty .erp-date-picker__value,
.erp-date-picker__icon { color: #64748b; }
.erp-date-picker__icon { width: 1.15rem; height: 1.15rem; flex: none; }
.erp-date-picker__icon svg { display: block; width: 100%; height: 100%; }

.erp-date-picker__trigger:focus-visible {
    outline: 2px solid var(--ring-color, #0d9488);
    outline-offset: 2px;
}

.erp-date-picker__disabled { opacity: 0.55; }

.erp-calendar {
    box-sizing: border-box;
    position: fixed;
    z-index: 10000;
    padding: 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.75rem;
    background: #fff;
    color: #0f172a;
    box-shadow: 0 12px 32px #0f172a26;
    max-height: calc(100dvh - 1rem);
    overflow: auto;
}

.dark .erp-calendar { background: #1e293b; color: #f8fafc; border-color: #475569; }
.erp-calendar__header { display: flex; align-items: center; gap: 0.25rem; }
.erp-calendar__header button { min-height: 2.25rem; border-radius: 0.35rem; }
.erp-calendar__previous, .erp-calendar__next { width: 2.25rem; flex: none; font-size: 1.5rem; }
.erp-calendar__title { flex: 1; font-weight: 600; }
.erp-calendar__header button:hover:not(:disabled), .erp-calendar__choice:hover:not(:disabled) { background: #ccfbf1; color: #115e59; }
.erp-calendar button:focus-visible { outline: 2px solid #0d9488; outline-offset: 2px; }
.erp-calendar__choices { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.35rem; margin-top: 0.75rem; min-height: 11rem; align-content: center; }
.erp-calendar__choice { min-height: 3rem; border-radius: 0.35rem; }
.erp-calendar__choice[aria-pressed="true"] { background: #0d9488; color: white; }
.erp-calendar__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.1rem; margin-top: 0.75rem; text-align: center; }
.erp-calendar__weekday { padding: 0.35rem 0; color: #64748b; font-size: 0.75rem; }
.erp-calendar__day { aspect-ratio: 1; border-radius: 0.35rem; }
.erp-calendar__day:hover:not(:disabled), .erp-calendar__day:focus-visible { background: #ccfbf1; color: #115e59; }
.erp-calendar__day[aria-pressed="true"] { background: #0d9488; color: white; }
.erp-calendar button:disabled { opacity: 0.35; cursor: not-allowed; }
.erp-calendar__time { display: flex; justify-content: space-between; align-items: center; margin-top: 0.65rem; }
.erp-calendar__time input { border: 1px solid #cbd5e1; border-radius: 0.35rem; padding: 0.3rem; background: inherit; color: inherit; }
.erp-calendar__footer { display: flex; justify-content: space-between; margin-top: 0.65rem; border-top: 1px solid #cbd5e1; padding-top: 0.55rem; color: #0d9488; }
.erp-calendar__back { margin: 0 auto; padding: 0.2rem 0.5rem; }
.dark .erp-calendar__header button:hover:not(:disabled), .dark .erp-calendar__choice:hover:not(:disabled) { background: #134e4a; color: #f0fdfa; }

@media (hover: none) and (pointer: coarse) {
    .erp-calendar__previous, .erp-calendar__next { min-width: 2.75rem; min-height: 2.75rem; }
    .erp-calendar__choice { min-height: 2.75rem; }
}
