/**
 * eKülliye text date input (GG.AA.YYYY) + takvim alanı.
 * Native type=date görünümü JS ile bu yapıya yükseltilir.
 *
 * Takvim: sağdaki şeffaf native date (ayrı button yok) —
 * form-container button stillerine takılmaz, Safari popup düzgün kapanır.
 */

.ek-date-input {
    position: relative;
    display: block;
    width: 100%;
}

.ek-date-input__display {
    position: relative;
    z-index: 0;
    width: 100%;
    box-sizing: border-box;
    padding-right: 2.5rem !important;
}

.ek-date-input__icon {
    position: absolute;
    top: 50%;
    right: 0.55rem;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    transform: translateY(-50%);
    color: var(--muted-foreground, #6b5a62);
    pointer-events: none;
}

.ek-date-input__icon svg {
    display: block;
    width: 16px;
    height: 16px;
}

/* İkonun üstünde tıklanabilir native date — form input width:100% ezmesin */
.ek-date-input__native-picker {
    position: absolute !important;
    top: 50% !important;
    right: 0.2rem !important;
    left: auto !important;
    z-index: 2;
    width: 2rem !important;
    min-width: 2rem !important;
    max-width: 2rem !important;
    height: 2rem !important;
    min-height: 2rem !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 6px !important;
    transform: translateY(-50%);
    opacity: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    cursor: pointer;
    color-scheme: inherit;
    box-sizing: border-box !important;
}

.ek-date-input__native-picker:disabled {
    cursor: not-allowed;
}

.ek-date-input__native-picker::-webkit-calendar-picker-indicator {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    cursor: pointer;
    opacity: 0;
}

body.dark-theme .ek-date-input__icon {
    color: #c9b4bd;
}

/* Filter rows: keep compact width where parent sizes the field */
.system-index-filter__fields .ek-date-input,
.student-timeline__filter-fields .ek-date-input {
    width: auto;
    min-width: 10.5rem;
}

.system-index-filter__fields .ek-date-input__display,
.student-timeline__filter-fields .ek-date-input__display {
    min-width: 10.5rem;
}

html[dir="rtl"] .ek-date-input__display {
    padding-right: 0.75rem !important;
    padding-left: 2.5rem !important;
}

html[dir="rtl"] .ek-date-input__icon {
    right: auto;
    left: 0.55rem;
}

html[dir="rtl"] .ek-date-input__native-picker {
    right: auto !important;
    left: 0.2rem !important;
}
