/* ---------------------- CompactDatepicker Modern CSS ---------------------- */
.vs-datepicker {
    position: absolute;
    background: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    border-radius: 8px;
    padding: 8px;
    font-size: 14px;
    z-index: 9999;
    width: 240px;
    max-width: 95vw;
    user-select: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.vs-datepicker .header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}
.vs-datepicker .month-arrow {
    font-weight: bold;
    padding: 2px 6px;
    cursor: pointer;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #f5f5f5;
    transition: background 0.2s;
}
.vs-datepicker .month-arrow:hover,
.vs-datepicker .month-arrow:focus {
    background: #4caf50;
    color: #fff;
    outline: none;
}
.vs-datepicker select {
    font-size: 14px;
    padding: 4px 6px;
    border-radius: 4px;
    border: 1px solid #ccc;
    text-align: center;
}
.vs-datepicker table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
}
.vs-datepicker th, .vs-datepicker td {
    padding: 2px;
}
.vs-datepicker td button {
    width: 30px;
    height: 30px;
    border: none;
    background: #f5f5f5;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}
.vs-datepicker td button:hover, .vs-datepicker td button:focus {
    background: #4caf50;
    color: #fff;
    outline: none;
}
.vs-datepicker td button.selected {
    background: #2196f3;
    color: #fff;
}
.vs-datepicker .today-btn {
    width: 100%;
    margin-top: 6px;
    padding: 6px 0;
    background: #ff9800;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}
.vs-datepicker .today-btn:hover, .vs-datepicker .today-btn:focus {
    background: #fb8c00;
    outline: none;
}
@media (max-width: 400px) {
    .vs-datepicker {
        width: 95vw;
        font-size: 13px;
    }
    .vs-datepicker td button {
        width: 26px;
        height: 26px;
    }
    .vs-datepicker select {
        font-size: 13px;
        padding: 3px 5px;
    }
}

/* =====================================================================
   Missing & Polished Styles for CompactDatepicker
   ===================================================================== */

/* ---------------------- Table Head (Weekdays) ---------------------- */
.vs-datepicker thead th {
    font-weight: 600;
    font-size: 13px;
    padding: 6px 0;
    color: #555;
    background: #f0f0f0;
    border-bottom: 1px solid #ddd;
}

/* Weekend header highlight */
.vs-datepicker thead th:first-child,
.vs-datepicker thead th:last-child {
    color: #e53935;
}

/* ---------------------- Table Body ---------------------- */
.vs-datepicker tbody td {
    padding: 2px;
}

/* Empty cells (previous/next month gaps) */
.vs-datepicker td.empty {
    pointer-events: none;
}
.vs-datepicker td.empty::after {
    content: '';
    display: block;
    width: 30px;
    height: 30px;
}

/* ---------------------- Day Buttons ---------------------- */
.vs-datepicker td button {
    font-size: 13px;
    line-height: 1;
}

/* Today (not selected) */
.vs-datepicker td button.today {
    border: 1px solid #ff9800;
    background: #fff7e6;
    color: #e65100;
}

/* Selected day */
.vs-datepicker td button.selected {
    background: #2196f3;
    color: #fff;
}

/* Today + Selected */
.vs-datepicker td button.today.selected {
    background: #1976d2;
    border-color: #1976d2;
    color: #fff;
}

/* Disabled dates */
.vs-datepicker td button.disabled {
    background: #eee;
    color: #aaa;
    cursor: not-allowed;
}
.vs-datepicker td button.disabled:hover {
    background: #eee;
    color: #aaa;
}

/* Weekend dates */
.vs-datepicker td.weekend button {
    color: #d32f2f;
}

/* ---------------------- Hover & Focus Accessibility ---------------------- */
.vs-datepicker button:focus-visible {
    outline: 2px solid #4caf50;
    outline-offset: 2px;
}

/* Keyboard hover simulation */
.vs-datepicker td button:active {
    transform: scale(0.95);
}

/* ---------------------- Header Enhancements ---------------------- */
.vs-datepicker .header select:focus {
    border-color: #4caf50;
    box-shadow: 0 0 0 2px rgba(76,175,80,0.2);
}

/* Month arrows disabled */
.vs-datepicker .month-arrow.disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* ---------------------- Today Button Enhancements ---------------------- */
.vs-datepicker .today-btn:active {
    transform: scale(0.98);
}

/* ---------------------- Subtle Animation ---------------------- */
.vs-datepicker {
    animation: vsFadeIn 0.15s ease-out;
}

@keyframes vsFadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------------------- Mobile Refinements ---------------------- */
@media (max-width: 400px) {
    .vs-datepicker thead th {
        font-size: 12px;
        padding: 4px 0;
    }

    .vs-datepicker td button.today {
        border-width: 1px;
    }
}
