﻿.ethiopian-datepicker-display {
    display: inline-block;
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.875rem;
    color: #1d2329;
    line-height: 1.5;
}

.ethiopian-datepicker-editor,
.dxbl-ethiopian-editor {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 100%;
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.ethiopian-datepicker-input {
    width: 100%;
    min-width: 220px;
    height: 32px;
    padding: 0 12px;
    border: 1px solid #b4bec8;
    border-radius: 4px;
    background: #fff;
    color: #1d2329;
    font-size: 0.875rem;
    letter-spacing: 0.2px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ethiopian-datepicker-input:hover {
    border-color: #8f9aa6;
}

.ethiopian-datepicker-input:focus,
.ethiopian-datepicker-input:active {
    border-color: #2fb6e0;
    box-shadow: 0 0 0 1px #2fb6e0;
}

.ethiopian-datepicker-input::placeholder {
    color: #9aa2ab;
}

.dxbl-ethiopian-editor .ethiopian-datepicker-input {
    padding-right: 36px;
}

.ethiopian-datepicker-toggle {
    position: absolute;
    right: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 28px;
    padding: 0;
    border: none;
    background: transparent;
    color: #4b5563;
    cursor: pointer;
    border-radius: 3px;
    transition: background 0.15s ease, color 0.15s ease;
}

.ethiopian-datepicker-toggle:hover {
    background: rgba(47, 182, 224, 0.12);
    color: #1d9fc9;
}

/* Full-screen layer that hosts the overlay + popup. It is moved to
   <body> by the JS helper so it escapes any ancestor stacking context
   (e.g. a datagrid) and always renders on top. */
.ethiopian-datepicker-layer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    pointer-events: none;
}

.ethiopian-datepicker-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    background: transparent;
    pointer-events: auto;
}

.ethiopian-datepicker-popup {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 100001;
    width: 300px;
    padding: 0;
    background: #fff;
    border: 1px solid #d7dee5;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(21, 33, 47, 0.18), 0 2px 6px rgba(21, 33, 47, 0.08);
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #1d2329;
    user-select: none;
    pointer-events: auto;
}

/* The JS helper positions the popup as fixed below the input so it always
   renders on top of other components, regardless of parent overflow/clip. */
.ethiopian-datepicker-popup.edp-fixed {
    position: fixed;
    visibility: hidden;
}

.ethiopian-datepicker-popup.edp-fixed.edp-positioned {
    visibility: visible;
}

/* Header (year + month selectors) */
.edp-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    border-bottom: 1px solid #eceff3;
    background: #f7f9fb;
}

.edp-title {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    width: 100%;
}

.edp-select {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

.edp-select-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: #6b7683;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.edp-year-select,
.edp-month-select {
    width: 100%;
    height: 30px;
    padding: 0 26px 0 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #1d2329;
    background: #fff;
    border: 1px solid #c6ced6;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' width='16' height='16' fill='none' stroke='%234b5563' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 7px center;
}

.edp-year-select:hover,
.edp-month-select:hover {
    border-color: #8f9aa6;
}

.edp-year-select:focus,
.edp-month-select:focus {
    border-color: #2fb6e0;
    box-shadow: 0 0 0 1px #2fb6e0;
}

.edp-select:nth-child(1) {
    flex: 0 0 38%;
}

.edp-select:nth-child(2) {
    flex: 1;
}

/* Calendar grid */
.edp-calendar {
    padding: 6px 10px 10px;
}

.week-header,
.week-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
}

.week-header {
    margin-bottom: 4px;
}

.weekday {
    padding: 4px 0;
    font-size: 0.72rem;
    font-weight: 600;
    color: #6b7683;
    text-transform: uppercase;
}

.day {
    aspect-ratio: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0;
    border: none;
    background: transparent;
    color: #1d2329;
    font-size: 0.8125rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.day:hover {
    background: rgba(47, 182, 224, 0.12);
}

.day.active {
    background: #2fb6e0;
    color: #fff;
    font-weight: 600;
}

.day.empty {
    pointer-events: none;
}

/* Footer */
.edp-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid #eceff3;
    background: #f7f9fb;
    border-radius: 0 0 6px 6px;
}

.edp-btn {
    height: 28px;
    padding: 0 14px;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.edp-btn-cancel {
    border: 1px solid #c6ced6;
    background: #fff;
    color: #374151;
}

.edp-btn-cancel:hover {
    border-color: #2fb6e0;
    color: #1d9fc9;
    background: rgba(47, 182, 224, 0.06);
}

.edp-btn-ok {
    border: 1px solid #2fb6e0;
    background: #2fb6e0;
    color: #fff;
}

.edp-btn-ok:hover {
    background: #1d9fc9;
    border-color: #1d9fc9;
    box-shadow: 0 2px 6px rgba(47, 182, 224, 0.35);
}
