/* Container & Input */
.date-container-relative { position: relative; width: 100%; }
.date-input-wrapper { position: relative; display: flex; align-items: center; cursor: pointer; }
.date-input-display { width: 100%; padding-right: 40px; cursor: pointer; }
.cal-icon { position: absolute; right: 12px; pointer-events: none; opacity: 0.5; font-size: 18px; }

/* Modal Box */
.calendar-modal { 
    position: absolute; top: calc(100% + 10px); left: 0; width: 320px; 
    background: #fff; border-radius: 16px; border: 1px solid var(--border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1); z-index: 1000; display: none; 
    padding: 20px; font-family: var(--font-family); box-sizing: border-box;
}

.calendar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }

/* Nav Buttons */
.nav-btn { 
    background: #f5f7f9; border: none; color: var(--accent); width: 36px; height: 36px; 
    border-radius: 10px; display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.nav-btn:disabled { opacity: 0.2 !important; cursor: not-allowed; }

/* Year Pill Styling */
.year-pill-container { position: relative; }
.year-pill {
    display: flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 10px;
    font-weight: 700; cursor: pointer; transition: all 0.2s; color: var(--text-main);
}
.year-pill:hover, .year-pill.active { background: var(--accent-light); color: var(--accent); }
.pill-arrow { font-size: 10px; opacity: 0.6; }

/* CUSTOM YEAR DROPDOWN */
.year-dropdown-list {
    position: absolute; top: calc(100% + 5px); left: 50%; transform: translateX(-50%);
    width: 140px; max-height: 250px; background: #fff; border: 1px solid var(--border);
    border-radius: 12px; box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    overflow-y: auto; display: none; z-index: 1100;
}

/* Year Search Bar */
.year-search-container {
    position: sticky; top: 0; background: #fff; padding: 8px;
    border-bottom: 1px solid var(--border); z-index: 10;
}
#year-search-input {
    width: 100%; padding: 6px 10px; border: 1px solid var(--border);
    border-radius: 8px; font-size: 13px; font-family: var(--font-family);
    box-sizing: border-box; outline: none;
}
#year-search-input:focus { border-color: var(--accent); }

.year-item {
    padding: 10px; text-align: center; cursor: pointer; font-size: 14px;
    font-weight: 600; transition: background 0.2s; border-bottom: 1px solid #f8f9fa;
}
.year-item:last-child { border-bottom: none; }
.year-item:hover { background: var(--accent-light); color: var(--accent); }
.year-item.selected { background: var(--accent); color: #fff; }

/* Custom Scrollbar */
.year-dropdown-list::-webkit-scrollbar { width: 5px; }
.year-dropdown-list::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 10px; }

/* Grid Styling */
.calendar-grid { display: grid !important; grid-template-columns: repeat(7, 1fr) !important; gap: 2px; }
.weekday { font-size: 11px; color: var(--text-sub); font-weight: 600; padding: 10px 0; text-align: center; }
.day { aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; font-size: 13px; cursor: pointer; border-radius: 50%; }
.day:not(.disabled):hover { background: var(--accent-light); color: var(--accent); }
.day.selected { background: var(--accent) !important; color: #fff !important; font-weight: bold; }
.day.today { color: var(--accent); font-weight: 800; border: 1px solid var(--accent-light); }
.day.disabled { color: #d1d5db; cursor: not-allowed; }

/* Footer */
.calendar-footer { display: flex; gap: 12px; margin-top: 20px; padding-top: 15px; border-top: 1px solid #f3f4f6; }
.cal-btn-primary { flex: 1; background: var(--accent); color: white; border: none; padding: 10px; border-radius: 10px; font-weight: 700; cursor: pointer; }
.cal-btn-secondary { flex: 1; background: white; color: var(--text-main); border: 1px solid var(--border); padding: 10px; border-radius: 10px; font-weight: 700; cursor: pointer; }