/* --- Ethiopian/Gregorian Datepicker Styles (datepicker.css) --- */
/* v1.9 - Includes Weekend Highlighting & Responsive Layouts */

.etgr-dp-container {
    position: absolute;
    border: 1px solid #aaa;
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    border-radius: 5px;
    width: 300px;
    z-index: 1000;
    font-family: var(--ff-sans), sans-serif;
    font-size: 13px;
    color: #333;
    display: none;
    line-height: 1.4;
}

.etgr-dp-container.etgr-dp-visible {
    display: block;
}

.etgr-dp-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 10px 12px; 
    background-color: #00796B; 
    color: white; 
    border-bottom: 1px solid #004D40; 
    border-radius: 5px 5px 0 0; 
    position: relative; 
}

.etgr-dp-header button.etgr-dp-nav-btn { 
    background: none; 
    border: none; 
    color: white; 
    font-size: 20px; 
    font-weight: bold; 
    cursor: pointer; 
    padding: 0 8px; 
    line-height: 1; 
    border-radius: 3px; 
    transition: background-color 0.15s ease; 
    flex-shrink: 0; 
}
.etgr-dp-header button.etgr-dp-nav-btn:hover { 
    background-color: rgba(255, 255, 255, 0.15); 
}
.etgr-dp-header button.etgr-dp-nav-btn:focus { 
    outline: none; 
    background-color: rgba(255, 255, 255, 0.2); 
}

.etgr-dp-month-year-selects { 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    gap: 8px; 
    margin: 0 5px; 
    overflow: hidden; 
}

.etgr-dp-month-select, .etgr-dp-year-select { 
    padding: 3px 5px; 
    border: 1px solid rgba(255, 255, 255, 0.5); 
    border-radius: 4px; 
    background-color: rgba(255, 255, 255, 0.15); 
    color: white; 
    font-size: 0.9em; 
    font-weight: bold; 
    cursor: pointer; 
    appearance: none; 
    max-width: 110px; 
}
.etgr-dp-year-select { max-width: 70px; }

.etgr-dp-month-select:focus, .etgr-dp-year-select:focus { 
    outline: none; 
    border-color: white; 
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3); 
}
.etgr-dp-month-select option, .etgr-dp-year-select option { 
    background-color: white; 
    color: #333; 
}

.etgr-dp-toggle-calendar { 
    font-size: 10px !important; 
    font-weight: normal !important; 
    padding: 4px 8px !important; 
    border: 1px solid rgba(255, 255, 255, 0.7) !important; 
    color: white !important; 
    background: none !important; 
    border-radius: 3px; 
    margin-left: 10px; 
    white-space: nowrap; 
    cursor: pointer; 
    line-height: 1; 
    transition: background-color 0.15s ease; 
    flex-shrink: 0; 
}
.etgr-dp-toggle-calendar:hover { background-color: rgba(255, 255, 255, 0.2) !important; }
.etgr-dp-toggle-calendar:focus { outline: none; background-color: rgba(255, 255, 255, 0.25) !important; }

.etgr-dp-weekdays { 
    display: grid; 
    grid-template-columns: repeat(7, 1fr); 
    text-align: center; 
    padding: 6px 0; 
    background-color: #f0f0f0; 
    font-weight: bold; 
    font-size: 10.5px; 
    color: #333; 
    border-bottom: 1px solid #ddd; 
}
.etgr-dp-weekdays div { padding: 4px 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.etgr-dp-days { display: grid; grid-template-columns: repeat(7, 1fr); padding: 5px; }

.etgr-dp-days div.etgr-dp-day { 
    box-sizing: border-box; 
    text-align: center; 
    padding: 5px 0 3px 0; 
    cursor: pointer; 
    border-radius: 3px; 
    border: 1px solid transparent; 
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out; 
    line-height: 1.1; 
    min-height: 34px; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    position: relative; 
}
.etgr-dp-days div.etgr-dp-day:hover:not(.etgr-dp-other-month):not(.etgr-dp-selected) { 
    background-color: #E0F2F7; 
    border-color: #B2DFDB; 
}

.etgr-dp-day.etgr-dp-other-month { color: #bbb; cursor: default; background-color: #f9f9f9; }
.etgr-dp-day.etgr-dp-other-month:hover { background-color: #f9f9f9; border-color: transparent; }
.etgr-dp-day.etgr-dp-other-month span { visibility: hidden; }

.etgr-dp-day.etgr-dp-selected { background-color: #00796B; color: white; font-weight: bold; border-color: #004D40; }
.etgr-dp-day.etgr-dp-selected:hover { background-color: #00695C; border-color: #004D40; }

.etgr-dp-day.etgr-dp-today { background-color: #FFF9C4; }
.etgr-dp-day.etgr-dp-today:hover:not(.etgr-dp-selected) { background-color: #FFF59D; border-color: #FBC02D; }
.etgr-dp-day.etgr-dp-today.etgr-dp-selected { background-color: #00796B; color: white; border-color: #004D40; }

.etgr-dp-days div.etgr-dp-day:focus { outline: none; border-color: #00796B; box-shadow: 0 0 0 1px #00796B inset; }

.etgr-dp-day span.etgr-dp-main-day { display: block; font-size: 1em; line-height: 1.2; color: #333; }
.etgr-dp-day.etgr-dp-selected span.etgr-dp-main-day { color: white; font-weight: bold; }
.etgr-dp-day.etgr-dp-today span.etgr-dp-main-day { font-weight: bold; }
.etgr-dp-day.etgr-dp-today.etgr-dp-selected span.etgr-dp-main-day { color: white; }

.etgr-dp-day span.etgr-dp-parallel-date { display: block; font-size: 0.7em; color: #888; line-height: 1; margin-top: -1px; }
.etgr-dp-day.etgr-dp-selected span.etgr-dp-parallel-date { color: #d0e0e3 !important; }
.etgr-dp-day.etgr-dp-today span.etgr-dp-parallel-date { color: #666; }
.etgr-dp-day.etgr-dp-today.etgr-dp-selected span.etgr-dp-parallel-date { color: #d0e0e3 !important; }

.etgr-dp-footer { 
    padding: 8px 10px; 
    border-top: 1px solid #eee; 
    background-color: #f9f9f9; 
    border-radius: 0 0 5px 5px; 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    gap: 8px; 
    flex-wrap: wrap; 
}

.etgr-dp-footer-button { 
    padding: 4px 10px; 
    font-size: 11px; 
    background-color: #e0e0e0; 
    border: 1px solid #ccc; 
    border-radius: 4px; 
    cursor: pointer; 
    transition: background-color 0.15s ease, border-color 0.15s ease; 
    white-space: nowrap; 
    flex-shrink: 0; 
    color: #333; 
    font-family: inherit; 
}
.etgr-dp-footer-button:hover { background-color: #d5d5d5; border-color: #bbb; }
.etgr-dp-footer-button:focus { outline: none; border-color: #00796B; box-shadow: 0 0 0 2px rgba(0, 121, 107, 0.2); }

.etgr-dp-time-section { display: flex; align-items: center; justify-content: center; gap: 5px; flex-grow: 1; min-width: 150px; }
.etgr-dp-time-section.etgr-dp-hidden { display: none !important; }

.etgr-dp-time-display-edit { text-align: center; position: relative; }
.etgr-dp-time-display-edit span.etgr-dp-time-text { font-weight: bold; font-size: 1.1em; padding: 3px 5px; display: inline-block; color: #333; }
.etgr-dp-time-display-edit input.etgr-dp-time-input { font-family: inherit; font-weight: bold; font-size: 1.1em; padding: 2px 5px; border: 1px solid #aaa; border-radius: 3px; width: 75px; text-align: center; }
.etgr-dp-time-display-edit input.etgr-dp-time-input.etgr-dp-hidden { display: none; }

.etgr-dp-time-edit-btn, .etgr-dp-time-save-btn { padding: 4px 8px; width: auto; flex-shrink: 0; }
.etgr-dp-time-edit-btn.etgr-dp-hidden, .etgr-dp-time-save-btn.etgr-dp-hidden { display: none; }

.etgr-dp-weekdays .etgr-dp-weekend-header { color: #b71c1c; }
.etgr-dp-days .etgr-dp-day.etgr-dp-weekend-day:not(.etgr-dp-other-month) { background-color: #fff3e0; }
.etgr-dp-days .etgr-dp-day.etgr-dp-weekend-day.etgr-dp-selected { color: white; }
.etgr-dp-days .etgr-dp-day.etgr-dp-weekend-day.etgr-dp-today { background-color: #ffecb3; }
.etgr-dp-days .etgr-dp-day.etgr-dp-weekend-day.etgr-dp-today.etgr-dp-selected { background-color: #00796B; color: white; border-color: #004D40; }
.etgr-dp-days div.etgr-dp-day.etgr-dp-weekend-day:hover:not(.etgr-dp-other-month):not(.etgr-dp-selected) { background-color: #ffe0b2; border-color: #ffa726; }

/* Responsive Overlay Layer */
.etgr-dp-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); z-index: 999; display: none; opacity: 0; transition: opacity 0.2s ease-in-out; }
body.etgr-dp-mobile-open { overflow: hidden; }
body.etgr-dp-mobile-open .etgr-dp-overlay { display: block; opacity: 1; }

@media (max-width: 600px) {
    .etgr-dp-container { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 90vw; max-width: 340px; max-height: 85vh; overflow-y: auto; z-index: 1001; bottom: auto; right: auto; }
    .etgr-dp-container { font-size: 14px; }
    .etgr-dp-days div.etgr-dp-day { min-height: 38px; padding: 6px 0 4px 0; }
    .etgr-dp-weekdays { font-size: 11px; padding: 8px 0; }
    .etgr-dp-footer-button { font-size: 12px; padding: 6px 12px; }
    .etgr-dp-header button.etgr-dp-nav-btn { font-size: 22px; }
    .etgr-dp-month-select, .etgr-dp-year-select { padding: 4px 6px; }
}