.responsive-container {
    padding-left: 1rem;
    padding-right: 1rem;
}

.responsive-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.img-responsive {
    max-width: 100%;
    height: auto;
}

/* ===== Flatpickr layout fixes (prevent weekday labels from collapsing) ===== */
/* Force flex/grid layout so the weekday labels and day cells take their proper widths.
   This ensures the weekday spans don't get rendered inline and concatenated like "SunMonTue..." */
.flatpickr-weekdays {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    gap: 4px !important;
}
.flatpickr-weekdays .flatpickr-weekdaycontainer {
    display: flex !important;
    flex: 1 1 0 !important; /* allow equal width per weekday */
    justify-content: center !important;
}
span.flatpickr-weekday {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    padding: 0 2px !important; /* small horizontal padding for visual breathing room */
    box-sizing: border-box !important;
    min-width: 34px !important; /* prevents weekday text from sticking if flex shrinks too far */
}

/* If day cells appear too close together, ensure they have consistent sizing */
.flatpickr-day {
    width: 14.2857% !important; /* 100% / 7 columns */
    max-width: 39px !important;
    display: inline-block !important;
    box-sizing: border-box !important;
}

/* Optional: small font tweaks if needed to avoid truncation */
.flatpickr-calendar,
.flatpickr-weekdays,
.flatpickr-day {
    font-size: 13px !important;
}

/* Highlight 'today' visually when calendar opens, but don't set the input value */
.flatpickr-calendar.open .flatpickr-day.today:not(.flatpickr-disabled) {
    background: #569ff7 !important; /* selected color */
    border-color: #569ff7 !important;
    color: #fff !important;
}

/* Make the calendar responsive on small screens */
@media (max-width: 480px) {
    .flatpickr-calendar {
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .dayContainer {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
    }
    .flatpickr-day {
        width: calc(100% / 7) !important;
        max-width: none !important;
        padding: 0 !important;
    }
}
