/* ====== MX_Calendar ====== */

[id$="-calendar-container"] {
    font-family: inherit;
    user-select: none;
    width: 100%;
    max-width: 340px;
}

/* --- Header --- */
.mx-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 4px;
    margin-bottom: 4px;
}

.mx-cal-title {
    font-weight: 700;
    font-size: 15px;
    text-transform: capitalize;
}

.mx-cal-nav {
    background: none;
    border: 1px solid #ddd;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, border-color .15s;
    color: #333;
}

.mx-cal-nav:hover {
    background: #f5f5f5;
    border-color: #bbb;
}

/* --- Grid --- */
.mx-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.mx-cal-dayname {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #888;
    padding: 4px 0;
    text-transform: uppercase;
}

/* --- Cells --- */
.mx-cal-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    font-size: 13px;
    border-radius: 10px;
    cursor: pointer;
    position: relative;
    transition: background .12s, color .12s;
}

.mx-cal-cell:hover {
    background: #f0f0f0;
}

/* Other month */
.mx-cal-other-month {
    color: #ccc;
}

/* Today */
.mx-cal-today {
    font-weight: 700;
    box-shadow: inset 0 0 0 1.5px #333;
}

/* --- Selection --- */
.mx-cal-start,
.mx-cal-end {
    background: var(--primary-yellow, #ffd600) !important;
    color: #000 !important;
    font-weight: 700;
    border-radius: 10px;
    z-index: 1;
}

.mx-cal-in-range {
    background: rgba(255, 214, 0, 0.2);
    border-radius: 0;
}

/* Rounded edges for range row transitions */
.mx-cal-start:not(.mx-cal-end) {
    border-radius: 10px 4px 4px 10px;
}

.mx-cal-end:not(.mx-cal-start) {
    border-radius: 4px 10px 10px 4px;
}

/* --- Hover preview --- */
.mx-cal-hover-range {
    background: rgba(255, 214, 0, 0.10);
    border-radius: 0;
}

.mx-cal-hover-end {
    background: rgba(255, 214, 0, 0.30);
    border-radius: 10px;
}

/* --- Info text --- */
.mx-cal-info {
    text-align: center;
    font-size: 12px;
    color: #555;
    padding: 8px 0 2px;
    min-height: 22px;
}

/* ====== Responsive ====== */
@media (max-width: 960px) {
    [id$="-calendar-container"] {
        max-width: 100%;
    }
}
