[hidden] {
    display: none !important;
}

.participants-page {
    min-height: 100vh;
}

.participants-content {
    margin-bottom: 40px;
}

.participants-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.participants-header-actions .btn {
    min-width: 96px;
    text-align: center;
}

.participants-panel {
    margin: 0;
    border: 1px solid #d7d7d7;
    border-radius: 2px;
    background: #ffffff;
    overflow: hidden;
}

.participants-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 10px;
    padding: 10px 14px 9px;
    border-bottom: 1px solid #dddddd;
    background: #ffffff;
}

.participants-header h1 {
    margin: 0;
    color: #1b3262;
    font-size: 22px;
    line-height: 1.2;
    font-weight: 700;
}

.participants-date-range {
    white-space: nowrap;
    color: #1b3262;
    font-size: 14px;
    font-weight: 700;
}

.participants-message {
    min-height: 20px;
    margin: 10px 14px 0;
    padding: 0;
    font-size: 13px;
    line-height: 17px;
    color: #575757;
    font-weight: 700;
}

.participants-message.is-error {
    padding: 5px 10px 6px;
    background: #fbe1e1;
    color: #9f1e1e;
    border-radius: 2px;
}

.participants-message.is-success {
    padding: 5px 10px 6px;
    background: #def6dc;
    color: #1f6a38;
    border-radius: 2px;
}

.participants-layout {
    display: grid;
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding: 12px 14px 14px;
}

.participants-layout-main {
    min-width: 0;
}

.participants-source-panel {
    border: 1px solid #d7d7d7;
    border-radius: 2px;
    background: #f3f3f3;
    position: sticky;
    top: 12px;
    overflow: hidden;
    max-height: calc(100vh - 68px);
    display: flex;
    flex-direction: column;
}

.participants-source-panel h2 {
    margin: 0;
    padding: 8px 10px 9px;
    background: #294681;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    line-height: 17px;
    text-transform: uppercase;
}

.participants-source-hint {
    margin: 8px 10px;
    color: #575757;
    font-size: 12px;
    line-height: 16px;
}

.participants-source-list {
    padding: 0 8px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
}

.participant-source-item {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 6px;
    border: 1px solid #dddddd;
    border-radius: 2px;
    background: #ffffff;
    color: #000000;
    text-align: left;
    padding: 5px 6px;
    cursor: grab;
}

.participant-source-item:hover:not(:disabled) {
    background: #f3f3f3;
}

.participant-source-item--male {
    border-color: #b8c3db;
    background: #f1f5ff;
}

.participant-source-item--female {
    border-color: #deb391;
    background: #fff7ef;
}

.participant-source-item--unspecified {
    border-color: #dddddd;
    background: #ffffff;
}

.participant-source-item:active {
    cursor: grabbing;
}

.participant-source-item.is-dragging {
    opacity: 0.6;
}

.participant-source-item.is-assigned,
.participant-source-item:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(0.25);
    pointer-events: none;
}

.participant-source-item__name {
    font-size: 12px;
    line-height: 15px;
    font-weight: 700;
}

.participant-source-item__gender {
    min-width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #aaa;
    border-radius: 11px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.participant-source-item__gender--male {
    border-color: #a7b9de;
    background: #dbe5fb;
    color: #1b3262;
}

.participant-source-item__gender--female {
    border-color: #deb391;
    background: #fecda6;
    color: #63371f;
}

.participant-source-item__gender--unspecified {
    border-color: #aaaaaa;
    background: #f3f3f3;
    color: #595959;
}

.participants-cabin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.cabin-card {
    border: 1px solid #aaaaaa;
    border-radius: 2px;
    overflow: hidden;
    background: #ffffff;
    break-inside: avoid;
}

.cabin-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-bottom: 1px solid #dddddd;
    background: #f3f3f3;
}

.cabin-card--male {
    border-color: #b8c3db;
}

.cabin-card--male .cabin-card-header {
    background: #dbe5fb;
    border-bottom-color: #b8c3db;
}

.cabin-card--female {
    border-color: #deb391;
}

.cabin-card--female .cabin-card-header {
    background: #fecda6;
    border-bottom-color: #deb391;
}

.cabin-card--mixed .cabin-card-header {
    background: #e6f4ff;
    border-bottom-color: #c3cfd8;
}

.cabin-card-title-wrap {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cabin-card-title {
    color: #1b3262;
    font-size: 13px;
    line-height: 17px;
    font-weight: 700;
    text-transform: uppercase;
}

.cabin-card-gender {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 20px;
    padding: 0 8px;
    border-radius: 11px;
    border: 1px solid #aaa;
    font-size: 11px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.cabin-card-gender--male {
    border-color: #a7b9de;
    background: #f1f5ff;
    color: #1b3262;
}

.cabin-card-gender--female {
    border-color: #deb391;
    background: #fff7ef;
    color: #63371f;
}

.cabin-card-gender--mixed {
    border-color: #c3cfd8;
    background: #f2f8fc;
    color: #23425a;
}

.cabin-card-meta {
    white-space: nowrap;
    color: #444444;
    font-size: 12px;
    line-height: 15px;
}

.slot-rows {
    display: flex;
    flex-direction: column;
}

.slot-row {
    display: grid;
    grid-template-columns: 36px 1fr 64px;
    align-items: center;
    min-height: 35px;
    border-bottom: 1px solid #ececec;
}

.slot-rows .slot-row:last-child {
    border-bottom: 0;
}

.slot-row.is-drag-over {
    background: #e6f4ff;
}

.slot-row.is-drag-blocked {
    background: #fbe1e1;
}

.slot-row.slot-row--assigned {
    background: #def6dc;
}

.slot-number {
    text-align: center;
    color: #595959;
    font-size: 13px;
    font-weight: 700;
}

.slot-name-cell {
    padding: 4px 6px;
}

.slot-name-input {
    width: 100%;
    height: 26px;
    border: 1px solid #aaaaaa;
    border-radius: 2px;
    background: #ffffff;
    color: #1b1b1b;
    padding: 0 5px;
    font-size: 13px;
    line-height: 24px;
}

.slot-name-input:focus,
.slot-name-input:hover {
    border-color: #555555;
    outline: 0;
}

.slot-name-print {
    display: none;
}

.slot-gender-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-right: 6px;
}

.slot-gender-toggle {
    width: 40px;
    height: 24px;
    border: 1px solid #aaaaaa;
    border-radius: 2px;
    background: #ffffff;
    color: #000000;
    font-size: 13px;
    line-height: 1;
    font-weight: 700;
    cursor: pointer;
}

.slot-gender-toggle:hover:not(:disabled) {
    background: #f3f3f3;
}

.slot-gender-toggle--locked {
    opacity: 0.75;
    cursor: not-allowed;
}

.slot-gender-print {
    display: none;
}

.participants-empty {
    margin: 8px 2px 0;
    color: #707070;
}

.participants-duplicates {
    margin: 8px 0 0;
    padding-left: 18px;
    text-align: left;
}

.participants-page-number {
    display: none;
}

body.participants-page--gender-neutral .slot-row {
    grid-template-columns: 36px 1fr;
}

body.participants-page--gender-neutral .slot-gender-cell {
    display: none;
}

@media (max-width: 1200px) {
    .participants-cabin-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 980px) {
    .participants-content {
        margin: 12px;
    }

    .participants-layout {
        grid-template-columns: 1fr;
    }

    .participants-source-panel {
        position: static;
        max-height: none;
    }

    .participants-source-list {
        max-height: none;
    }

    .participants-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .participants-date-range {
        white-space: normal;
    }
}

@page {
    size: A4 portrait;
    margin: 10mm;
}

@media print {
    html,
    body {
        background: #ffffff !important;
        color: #000000;
        font-family: "Times New Roman", Georgia, serif;
        font-size: 10pt;
        line-height: 1.3;
    }

    .no-print,
    .participants-message {
        display: none !important;
    }

    .participants-content {
        margin: 0;
    }

    .participants-panel {
        margin: 0;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .participants-header {
        margin: 0 0 8mm;
        padding: 0 0 2mm;
        border-bottom: 0.3mm solid #000000;
        background: #ffffff;
    }

    .participants-header h1 {
        font-size: 13pt;
        color: #000000;
    }

    .participants-date-range {
        font-size: 10pt;
        color: #000000;
        text-align: right;
    }

    .participants-layout {
        display: block;
        padding: 0;
    }

    .participants-cabin-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 4mm;
    }

    .cabin-card {
        border: 0.2mm solid #000000;
        border-radius: 0;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .cabin-card-header,
    .cabin-card--male .cabin-card-header,
    .cabin-card--female .cabin-card-header,
    .cabin-card--mixed .cabin-card-header {
        background: #ffffff;
        border-bottom: 0.2mm solid #000000;
    }

    .cabin-card-title {
        font-size: 9pt;
        color: #000000;
    }

    .cabin-card-meta,
    .cabin-card-gender {
        font-size: 8.6pt;
        color: #000000;
        border-color: #000000;
        background: #ffffff;
    }

    .slot-row {
        min-height: 7mm;
        grid-template-columns: 8mm 1fr 9mm;
        border-bottom: 0.18mm solid #000000;
    }

    body.participants-page--gender-neutral .slot-row {
        grid-template-columns: 8mm 1fr;
    }

    .slot-number {
        color: #000000;
        font-size: 9pt;
    }

    .slot-name-cell {
        padding: 0 0.8mm;
    }

    .slot-name-input,
    .slot-gender-toggle {
        display: none !important;
    }

    .slot-name-print {
        display: block;
        min-height: 5.6mm;
        line-height: 5.6mm;
        padding: 0 1mm;
        font-size: 9.4pt;
    }

    .slot-gender-print {
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 9pt;
        font-weight: 700;
    }

    body.participants-page--gender-neutral .slot-gender-print {
        display: none;
    }

    .participants-page-number {
        display: block;
        position: fixed;
        right: 0;
        bottom: 0;
        font-size: 8pt;
    }

    .participants-page-number::after {
        content: "Strana " counter(page) " / " counter(pages);
    }
}
