.pmf-wrapper { max-width: 100%; }

.pmf-event-date {
    font-size: 1.05em;
    margin-bottom: 14px;
}

.pmf-table-wrap {
    overflow-x: auto;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    background: #fff;
}

.pmf-schedule {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}

.pmf-schedule th,
.pmf-schedule td {
    padding: 10px 12px;
    border-bottom: 1px solid #ececec;
    text-align: left;
    vertical-align: top;
}

.pmf-schedule thead th {
    background: #f5f6f8;
    font-weight: 600;
    position: sticky;
    top: 0;
}

.pmf-schedule .pmf-time {
    width: 80px;
    font-weight: 700;
    background: #fafafa;
}

.pmf-cell label {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 8px;
    row-gap: 2px;
    align-items: start;
    cursor: pointer;
    user-select: none;
}

.pmf-cell input[type=checkbox] {
    grid-row: 1 / span 2;
    align-self: start;
    margin-top: 3px;
}

.pmf-class-name {
    grid-column: 2;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.2px;
    color: #000000;
}

.pmf-cap {
    grid-column: 2;
    font-size: 12px;
    color: #666;
    line-height: 1.2;
}
.pmf-cap-sold {
    color: #b00020;
    font-weight: 600;
}

.pmf-empty {
    color: #bbb;
    text-align: center;
}

/* Kolory sal – spójne z aplikacją rezerwacji (sale/style.css) */
.pmf-room--aerial  { --pmf-room: #4BBEC6; }
.pmf-room--pole    { --pmf-room: #FBC22D; }
.pmf-room--fitness { --pmf-room: #774DFB; }
.pmf-room--zlota   { --pmf-room: #FFD700; }
.pmf-room--mala    { --pmf-room: #D696B8; }

/* Nagłówki kolumn (sale) – wypełnienie kolorem sali */
.pmf-schedule thead th.pmf-room {
    background: var(--pmf-room, #f5f6f8);
    color: #fff;
    text-shadow: 0 1px 1px rgba(0,0,0,.15);
    border-bottom: 2px solid rgba(0,0,0,.08);
}
/* Dla jasnej żółci/złota czytelniejszy tekst na ciemno */
.pmf-schedule thead th.pmf-room--pole,
.pmf-schedule thead th.pmf-room--zlota {
    color: #3a2a00;
    text-shadow: none;
}

/* Kolorowy pasek po lewej stronie komórek dla danej sali */
.pmf-schedule td.pmf-cell,
.pmf-schedule td.pmf-empty {
    border-left: 4px solid var(--pmf-room, transparent);
}

/* Akcent checkboxa w kolorze sali (gdzie wspierane) */
.pmf-cell input[type=checkbox] {
    accent-color: var(--pmf-room, #111);
}

/* Zaznaczona komórka – delikatne tło w kolorze sali */
.pmf-cell:has(input[type=checkbox]:checked) {
    background: color-mix(in srgb, var(--pmf-room, #111) 12%, #fff);
}

.pmf-cell.pmf-soldout {
    background: #fafafa;
    opacity: 0.7;
}
.pmf-cell.pmf-soldout label { cursor: not-allowed; }

.pmf-summary {
    margin-top: 20px;
    padding: 18px 20px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}
.pmf-summary h3 {
    margin: 0 0 12px;
    font-size: 1.1em;
}
.pmf-summary-list {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
}
.pmf-summary-list li {
    padding: 6px 0;
    border-bottom: 1px dashed #e5e7eb;
    display: flex;
    align-items: center;
    gap: 8px;
}
.pmf-summary-list li:last-child { border-bottom: 0; }
.pmf-summary-list em { color: #666; font-style: normal; }
.pmf-room-chip {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    background: var(--pmf-room, #999);
    flex: 0 0 14px;
}

.pmf-summary-empty { color: #777; font-style: italic; margin: 0 0 12px; }

.pmf-price {
    margin: 10px 0;
}

.pmf-actions { margin: 12px 0 0; }

.pmf-submit {
    background: #111;
    color: #fff;
    border: 0;
    padding: 10px 22px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
}
.pmf-submit:hover:not([disabled]) { background: #222; }
.pmf-submit[disabled] { opacity: 0.5; cursor: not-allowed; }

.pmf-message {
    margin-top: 10px;
    color: #b00020;
    font-weight: 600;
}

/* Mobile – węższe kolumny, zbity layout w komórce */
@media (max-width: 640px) {
    .pmf-schedule { min-width: 0; }

    .pmf-schedule th,
    .pmf-schedule td {
        padding: 6px 6px;
    }

    .pmf-schedule .pmf-time {
        width: 52px;
        font-size: 13px;
    }

    .pmf-schedule thead th.pmf-room {
        font-size: 13px;
        padding: 6px 4px;
    }

    .pmf-cell label {
        column-gap: 5px;
    }

    .pmf-class-name {
        font-size: 13px;
        letter-spacing: 0;
    }

    .pmf-cap {
        font-size: 11px;
    }
}
