.workcal {
    font-family: "Inter Display", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: #000;
    padding: 180px 0 180px 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

@media screen and (max-width: 767px) {
    .workcal {
        padding: 120px 0 120px 0;
    }
}

.workcal__header {
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: relative;
}

.workcal__loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    opacity: 0;
    transition: opacity 300ms ease;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
}

.workcal__loader.htmx-request {
    display: flex;
    opacity: 1;
}

.workcal__spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top-color: #7a00d6;
    border-right-color: #7a00d6;
    border-radius: 50%;
    animation: workcal-spin 0.8s linear infinite;
}

@keyframes workcal-spin {
    to {
        transform: rotate(360deg);
    }
}

.workcal__nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.workcal__title {
    font-weight: 700;
    font-size: 20px;
}

/* Theme-like links */
.workcal__navLink,
.workcal__monthTitle {
    font-size: 18px;
    font-weight: 600;
}

.workcal__navLink {
    font-size: 18px;
    width: 18px;
    height: 18px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    flex-shrink: 0;
}

.workcal__navLink.prev,
.workcal__navLink.next {
    transition: transform 150ms ease;
}

.workcal__navLink.prev:hover {
    transform: translateX(-5px);
}

.workcal__navLink.next:hover {
    transform: translateX(5px);
}

.workcal__navLink svg {
    width: 10px;
}

.workcal__controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    align-items: center;
}

.workcal__pills {
    padding: 5px;
    background: white;
    border-radius: 3px;
    max-width: 546px;
    width: 100%;
    display: flex;
    gap: 8px;
}

/* Pills / buttons -> match theme surfaces + subtle borders */
.workcal__pill {
    flex: 1;
    background: rgb(248 245 242); /* theme darkergrayish */
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease;
    border-radius: 3px;
}

.workcal__pill:hover {
    background: #7A00D6;
    color: #ffffff;
}

.workcal__pill.is-active {
    background: #7A00D6;
    color: #ffffff;
}

.workcal__yearSearch {
    display: flex;
    gap: 6px;
    align-items: center;
    max-width: 431px;
    width: 100%;
}

/* Inputs/buttons: align with custom-select + form styling */
.workcal__yearSearch input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(26, 26, 26, 0.10);
    background: #FFF;
}

.workcal__yearSearch button {
    padding: 10px 16px;
    border-radius: 6px;
    background: #000;
    cursor: pointer;
    transition: background-color 200ms ease, border-color 200ms ease;
    color: white;
}

.workcal__yearSearch button:hover {
    background: #7A00D6;
    color: #ffffff;
}

/* Focus ring consistency */
.workcal__pill:focus-visible,
.workcal__yearSearch input:focus-visible,
.workcal__yearSearch button:focus-visible,
.workcal__day:focus-visible {
    outline: 2px solid rgba(0, 0, 0, 0.25);
    outline-offset: 2px;
}

.workcal__hint {
    text-align: center;
    font-size: 13px;
}

#workcal-selected-notice {
    max-width: 910px;
    width: 100%;
    margin: 0 auto;
    padding: 24px;
    background: #F2D4E6;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#workcal-selected-notice .top {
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.20);
}

#workcal-selected-notice p {
    font-weight: 500;
}

#workcal-selected-notice .top p {
    font-weight: 600;
}

.workcal__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

@media (max-width: 980px) {
    .workcal__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .workcal__grid {
        grid-template-columns: 1fr;
    }
}

/* Month cards -> match theme card feel */
.workcal__monthBox {
    border: 1px solid rgba(26, 26, 26, 0.08);
    border-radius: 0.75rem;
    padding: 15px;
    background: #fff;
}

.workcal__table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    margin: 15px 0;
}

.workcal__table th {
    font-size: 12px;
    opacity: .65;
    padding: 6px 0;
    text-align: center;
}

.workcal__table th.workcal__weekHead {
    width: 36px;
    opacity: .5;
    text-align: right;
    padding-right: 6px;
}

.workcal__table td {
    padding: 2px;
    text-align: center;
}

.workcal__table td.workcal__weekNo {
    width: 36px;
    font-size: 11px;
    opacity: .55;
    text-align: right;
    padding-right: 6px;
    white-space: nowrap;
}

.workcal__table td.is-weekend .workcal__day {
    background: rgba(26, 26, 26, 0.03);
}

.workcal__table td.is-weekend .workcal__day:hover {
    background: rgb(248 245 242);
}

.workcal__table td.is-holiday .workcal__day {
    background: #f2d4e6;
}

/* Weekend + holiday: brighter highlight
   (works whether you use the combined class or just both flags) */
.workcal__table td.is-weekend.is-holiday .workcal__day,
.workcal__table td.is-weekendHoliday .workcal__day,
.workcal__day.is-weekend.is-holiday,
.workcal__day.is-weekendHoliday {
    background: #ffb3df; /* brighter than normal holiday */
}

.workcal__table td.is-weekend.is-holiday .workcal__day:hover,
.workcal__table td.is-weekendHoliday .workcal__day:hover,
.workcal__day.is-weekend.is-holiday:hover,
.workcal__day.is-weekendHoliday:hover {
    background: #ffa3d8;
}

/* If selected (purple), keep it purple but boost contrast slightly */
.workcal__table td.is-weekend.is-holiday .workcal__day.is-excluded,
.workcal__table td.is-weekendHoliday .workcal__day.is-excluded,
.workcal__day.is-weekend.is-holiday.is-excluded,
.workcal__day.is-weekendHoliday.is-excluded {
    box-shadow: 0 0 0 2px rgba(255, 179, 223, 0.85);
}

/* Day buttons */
.workcal__day {
    width: 100%;
    border: 0;
    background: transparent;
    padding: 8px 0;
    border-radius: 0.625rem;
    cursor: pointer;
    transition: background-color 150ms ease, opacity 150ms ease;
}

.workcal__day:hover {
    background: rgb(248 245 242);
}

.workcal__day.is-included {
    outline: 1px solid rgba(26, 26, 26, 0.1);
}

.workcal__day.is-excluded {
    opacity: 1;
    background: #7a00d6;
    color: #fff;
}

.workcal__stats {
    font-size: 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-weight: 500;
}

.workcal__statsTitle {
    font-weight: 600;
}


.workcal__yearTotals {
    padding: 38px;
    border-radius: 12px;
    background: #F2D4E6;
    min-height: 390px;
    position: relative;
}

.workcal__yearTotals .side-bottom {
    position: absolute;
    right: 0;
    bottom: 0;
    padding-top: 1rem; /* py-4 */
    padding-bottom: 1rem;

    padding-left: 1.5rem; /* px-6 */
    padding-right: 1.5rem;

    align-self: flex-start; /* self-start */
    border-top-left-radius: 18px; /* rounded-br-[18px] */

    background: #F8F5F2
}

.workcal__yearTotals .side-bottom .bot-left {
    position: absolute;
    left: 0;
    bottom: 0;
    transform: translateX(-100%) rotate(270deg);
}

.workcal__yearTotals .side-bottom .top-right {
    position: absolute;
    top: 0;
    right: 0;
    transform: translateY(-100%) rotate(270deg);
}

.workcal__yearTotalsTitle {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.workcal__yearTotals .quarter {
    font-size: 14px;
    font-weight: 500;
}

.workcal__yearTotals .sep {
    width: 100%;
    height: 1px;
    background: rgba(0, 0, 0, 0.20);
    margin: 16px 0;
}

.workcal__yearTotals .totla {
    font-size: 16px;
    font-weight: 500;
}

.workcal__singleNote {
    margin-top: 10px;
    font-size: 14px;
}

.workcal__holidays {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 14px;
}

.workcal__holidaysTitle {
    font-size: 14px;
    font-weight: 600;
}

.workcal__holidaysList {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.workcal__holidayRow {
    display: flex;
    gap: 8px;
}

.workcal__holidayDate {
    font-weight: 600;
}

.workcal__holidayName {
    font-weight: 500;
}

/* =========================================
   Selected range: make weekends/holidays brighter
   (place AFTER .workcal__day.is-excluded)
   ========================================= */

/* Weekend inside selected range */
.workcal__table td.is-weekend .workcal__day.is-excluded {
    background: #8f1fff; /* brighter purple */
    filter: brightness(1.08) saturate(1.15);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.55);
}

/* Holiday inside selected range */
.workcal__table td.is-holiday .workcal__day.is-excluded {
    background: #a63cff; /* even brighter */
    filter: brightness(1.10) saturate(1.20);
    box-shadow: 0 0 0 2px rgba(255, 179, 223, 0.95),
    0 0 14px rgba(255, 179, 223, 0.35);
}

/* Weekend + holiday inside selected range (brightest) */
.workcal__table td.is-weekend.is-holiday .workcal__day.is-excluded,
.workcal__table td.is-weekendHoliday .workcal__day.is-excluded {
    background: #c05cff;
    filter: brightness(1.12) saturate(1.25);
    box-shadow: 0 0 0 2px rgba(255, 179, 223, 1),
    0 0 18px rgba(255, 179, 223, 0.5);
}
