/* ======================================================
   Mark Your Calendar — Click-to-expand Monthly Calendar
   ====================================================== */

/* ── Force full width on every wrapping element ── */
#picker,
#myc-container,
.booking-calendar-wrapper,
.booking-calendar-main {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}
#picker,
#myc-container {
    display: block !important;
}
.booking-calendar-wrapper {
    display: flex !important;
    gap: 20px;
    align-items: flex-start;
}
.booking-calendar-main {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    display: block !important;
}
.booking-calendar-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px;
    box-sizing: border-box;
}
.booking-calendar-sidebar h5 { margin: 0 0 12px; font-weight: 600; font-size: .95rem; }
.booking-calendar-sidebar .class-slot {
    padding: 7px 0;
    border-bottom: 1px solid #eee;
    color: #0072b1;
    font-size: .9rem;
}

/* ── Container ── */
#myc-container {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e2eaf2;
    overflow: hidden;
    font-family: 'Roboto', sans-serif;
    box-shadow: 0 4px 20px rgba(0,114,177,.08);
}

/* ── Navigation bar ── */
#myc-nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px;
    background: linear-gradient(135deg, #0072b1 0%, #005a8d 100%);
}
#myc-prev-week-container,
#myc-next-week-container { display: inline-block; }

#myc-current-month-year-container {
    font-size: 1.1em;
    font-weight: 700;
    color: #fff;
    letter-spacing: .4px;
}
#myc-prev-week,
#myc-next-week {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.45);
    background: transparent;
    color: #fff;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6em; font-weight: 300; line-height: 1;
    transition: background .2s, border-color .2s, transform .15s;
    user-select: none;
}
#myc-prev-week:hover,
#myc-next-week:hover {
    background: rgba(255,255,255,.22);
    border-color: rgba(255,255,255,.9);
    transform: scale(1.08);
}

/* ── Grid wrapper ── */
#myc-week-container {
    padding: 16px;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden;
}

/* ── Day-of-week header ── */
.myc-grid-header {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
    margin-bottom: 6px;
    width: 100%;
}
.myc-grid-hcell {
    text-align: center;
    padding: 7px 2px;
    font-size: .72em;
    font-weight: 700;
    color: #9aa3b0;
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* ── Grid body ── */
.myc-grid-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}
.myc-grid-row {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
    width: 100%;
}

/* ── Base cell ── */
.myc-cell {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 2px 8px;
    min-height: 52px;
    border-radius: 10px;
    border: 2px solid transparent;
    background: #f4f7fa;
    box-sizing: border-box;
    cursor: default;
    transition: background .18s, border-color .18s, transform .15s, box-shadow .18s;
    user-select: none;
}

/* Empty filler cells */
.myc-cell.myc-empty {
    background: transparent;
    border-color: transparent;
    pointer-events: none;
    min-height: 52px;
}

/* Past days */
.myc-cell.myc-past {
    background: #f4f7fa;
    opacity: .38;
    pointer-events: none;
}

/* Today (no slots) */
.myc-cell.myc-today {
    border-color: #0072b1;
    background: #edf6ff;
}

/* Days with NO available slots (but not past) */
.myc-cell.myc-no-slots {
    background: #f4f7fa;
    opacity: .5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Days WITH available slots — interactive */
.myc-cell.myc-has-slots {
    background: #edf6ff;
    border-color: #bcd9f0;
    cursor: pointer;
}
.myc-cell.myc-has-slots:hover {
    background: #d6ecfa;
    border-color: #0072b1;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0,114,177,.18);
}

/* Selected / expanded day */
.myc-cell.myc-selected-day {
    background: #0072b1 !important;
    border-color: #005a8d !important;
    box-shadow: 0 6px 20px rgba(0,114,177,.35) !important;
    transform: translateY(-2px);
}
.myc-cell.myc-selected-day .myc-day-num {
    color: #fff !important;
    font-weight: 700;
}
.myc-cell.myc-selected-day .myc-dot {
    background: rgba(255,255,255,.8) !important;
}

/* ── Day number ── */
.myc-day-num {
    font-size: .88em;
    font-weight: 600;
    color: #2d3748;
    line-height: 1;
    text-align: center;
}
.myc-cell.myc-today .myc-day-num { color: #0072b1; font-weight: 700; }
.myc-cell.myc-past  .myc-day-num { color: #b0b8c1; }
.myc-cell.myc-no-slots .myc-day-num { color: #c0c8d0; }

/* ── Availability dot ── */
.myc-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #0072b1;
    margin-top: 5px;
    flex-shrink: 0;
    transition: background .18s;
}

/* ── Slots panel (slides down below the grid) ── */
.myc-slots-panel {
    margin-top: 14px;
    background: #f0f8ff;
    border: 1.5px solid #bcd9f0;
    border-radius: 12px;
    padding: 16px 16px 14px;
    box-sizing: border-box;
    overflow: hidden;
}

.myc-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 12px;
}
.myc-panel-date {
    font-size: .92em;
    font-weight: 700;
    color: #005a8d;
}
.myc-cal-icon {
    font-style: normal;
    margin-right: 4px;
}
.myc-panel-hint {
    font-size: .78em;
    color: #7a92a8;
    font-weight: 400;
}

/* ── Time-slot chip grid ── */
.myc-chips-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ── Individual chip ── */
.myc-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 14px;
    background: #fff;
    color: #0072b1;
    border: 1.5px solid #bcd9f0;
    border-radius: 999px;
    font-size: .84em;
    font-weight: 500;
    cursor: pointer;
    transition: background .18s, color .18s, border-color .18s, transform .12s, box-shadow .18s;
    white-space: nowrap;
    line-height: 1;
    box-shadow: 0 1px 4px rgba(0,114,177,.08);
}
.myc-chip:hover {
    background: #0072b1;
    color: #fff;
    border-color: #0072b1;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,114,177,.22);
}
.myc-chip.selected {
    background: #0072b1;
    color: #fff;
    border-color: #005a8d;
    box-shadow: 0 3px 10px rgba(0,114,177,.3);
}
.myc-chip.selected:hover {
    background: #005a8d;
    border-color: #00497a;
}

/* ── Responsive: large tablet ── */
@media (max-width: 992px) {
    .myc-cell       { min-height: 50px; padding: 6px 2px 7px; border-radius: 9px; }
    .myc-day-num    { font-size: .84em; }
    .myc-chip       { padding: 6px 12px; font-size: .82em; }
}

/* ── Responsive: tablet ── */
@media (max-width: 768px) {
    .booking-calendar-wrapper   { flex-direction: column; }
    .booking-calendar-sidebar   { width: 100%; }

    #myc-nav-container          { padding: 13px 16px; }
    #myc-current-month-year-container { font-size: .98em; }
    #myc-prev-week, #myc-next-week { width: 32px; height: 32px; font-size: 1.45em; }

    #myc-week-container         { padding: 12px; }

    .myc-grid-header, .myc-grid-row { gap: 3px; }
    .myc-grid-hcell             { font-size: .65em; padding: 6px 1px; }

    .myc-cell                   { min-height: 46px; padding: 5px 1px 6px; border-radius: 8px; border-width: 1.5px; }
    .myc-day-num                { font-size: .82em; }
    .myc-dot                    { width: 5px; height: 5px; margin-top: 4px; }

    .myc-slots-panel            { padding: 13px 12px 11px; margin-top: 12px; }
    .myc-chips-grid             { gap: 7px; }
    .myc-chip                   { padding: 6px 11px; font-size: .80em; }
}

/* ── Responsive: mobile ── */
@media (max-width: 576px) {
    #myc-container              { border-radius: 10px; }
    #myc-nav-container          { padding: 11px 13px; }
    #myc-current-month-year-container { font-size: .90em; }
    #myc-prev-week, #myc-next-week { width: 28px; height: 28px; font-size: 1.3em; border-width: 1.5px; }

    #myc-week-container         { padding: 9px; }

    .myc-grid-header, .myc-grid-row { gap: 2px; }
    .myc-grid-body              { gap: 2px; }
    .myc-grid-hcell             { font-size: .58em; padding: 5px 0; letter-spacing: 0; }

    .myc-cell                   { min-height: 42px; padding: 5px 1px 5px; border-radius: 7px; border-width: 1.5px; }
    .myc-day-num                { font-size: .76em; }
    .myc-dot                    { width: 5px; height: 5px; margin-top: 3px; }

    .myc-slots-panel            { padding: 11px 10px 10px; margin-top: 10px; border-radius: 10px; }
    .myc-panel-header           { flex-direction: column; align-items: flex-start; gap: 2px; }
    .myc-panel-date             { font-size: .86em; }
    .myc-chips-grid             { gap: 6px; }
    .myc-chip                   { padding: 6px 10px; font-size: .78em; border-radius: 999px; }
}

/* ── Responsive: very small phones ── */
@media (max-width: 380px) {
    #myc-week-container         { padding: 7px; }
    #myc-nav-container          { padding: 10px 11px; }
    #myc-current-month-year-container { font-size: .84em; }
    #myc-prev-week, #myc-next-week { width: 26px; height: 26px; font-size: 1.2em; }

    .myc-grid-header, .myc-grid-row { gap: 1px; }
    .myc-grid-body              { gap: 1px; }
    .myc-grid-hcell             { font-size: .52em; padding: 4px 0; }

    .myc-cell                   { min-height: 36px; padding: 4px 1px; border-radius: 6px; }
    .myc-day-num                { font-size: .70em; }
    .myc-dot                    { width: 4px; height: 4px; margin-top: 3px; }

    .myc-chip                   { padding: 5px 9px; font-size: .74em; }
}
