@view-transition {
    navigation: auto;
}

:root {
    --sidebar-menu-color: black;
    --table-cell-color: black;
    --table-hover-cell-bg: #d0e8ff
}

.page-login {
    .main-header {
        font-size: 1.5rem;
        font-weight: bold;
        color: #000;
        text-align: center;
        margin-bottom: 2rem;
    }
}

.page-reset-password {
    label {
        font-weight: bold;
        margin-right: 0.5rem;
    }

    button {
        margin-bottom: 1rem;
    }
}

.hidden {
    display: none;
}

.datagrid thead .form-check span {
    padding-left: 0;
}
.datagrid td {
    box-shadow: none;
    border-top: 1px solid var(--table-cell-border-color);
}
.datagrid tr.expandable-content-row td {
    border-top: none;
}

td.actions {
    span.btn-label:empty {
        display: none;
    }
}

.w-10 {
    width: 10%;
}

.scrollable-table {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    position: relative;

    table.datagrid {
        display: table;
        width: 100%;

        thead {
            position: sticky;
            top: 0;
            z-index: 10;
            background-color: #fff;
        }

        thead th {
            background-color: #fff;
        }

        tbody {
            display: table-row-group;
        }

        tfoot {
            position: sticky;
            bottom: 45px;
            z-index: 10;
            background-color: #fff;
        }

        tfoot tr {
            background-color: #fff;
        }
    }

    .content-panel-footer {
        position: sticky;
        bottom: 0;
        z-index: 10;
        background-color: #fff;
    }
}

.editable-table {
    td.field-association,
    td.field-select {
        position: relative;
    }

    .field-value {
        min-height: 1rem;
    }

    td.field-association .form-select,
    td.field-select .form-select {
        position: absolute;
        top: 7px;
        left: -4px;
        z-index: 1000;
        font-size: 14px;
        width: auto;
    }

    td[data-column="person.Centre"],
    td[data-column="person.lastName"],
    td[data-column="remarks"] {
        max-width: 130px;

        .field-value {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
    }

}

.default-row-action:not(.show-row-action) {
    display: none;
}

.datagrid thead i.fa-birthday-cake,
.datagrid thead i.fa-euro-sign,
.datagrid thead i.fa-power-off,
.datagrid thead i.fa-baby,
.datagrid thead i.fa-bed,
.datagrid thead i.fa-shower,
.datagrid thead i.fa-user-tie,
.datagrid thead i.fa-building,
.datagrid thead i.fa-toilet {
    color: black;
}

.datagrid thead a, .datagrid thead span.header-tooltip {
    display: inline-block;
    padding: 0;
}

body:not(.table-double-striped) .datagrid tbody tr:nth-child(even) td {
    background-color: #f1fff2
}
body:not(.table-double-striped) .datagrid tbody tr:nth-child(even):hover td {
    background-color: var(--table-hover-cell-bg);
}

.table-double-striped .datagrid tbody tr:nth-child(4n + 1) td,
.table-double-striped .datagrid tbody tr:nth-child(4n + 2) td {
    background-color: #f1fff2
}
.table-double-striped .datagrid tbody tr:nth-child(4n + 3) td,
.table-double-striped .datagrid tbody tr:nth-child(4n + 4) td {
    background-color: white;
}

.form-fieldset-header {
    max-width: 50%;
}

.collection-actions {
    margin-top: -45px;
    margin-right: -7px;
}
.field-value.overcapacity {
    color: red;
}
.field-value.full {
    color: blue;
}

.expand-toggle {
    cursor: pointer;
}
.expand-toggle .fa-chevron-up {
    display: none;
}

.expand-toggle.expanded .fa-chevron-up {
    display: inline-block;
}
.expand-toggle.expanded .fa-chevron-down {
    display: none;
}

.expandable-content-data {
    display: none;
}

.expandable-content-row {
    display: none;
}

.expandable-content-row.expanded {
    display: table-row;
}

.active-participants-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(6, auto);
    grid-auto-flow: column;
    gap: 3px;
}

.unassigned-participants-list {
    min-height: 20px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 3px;
}

.participants-no-dormitory .unassigned-participants-list {
    grid-template-columns: 1fr;
}

.participant-item {
    cursor: grab;
    display: inline-block;
    padding: 4px;
    margin-right: 4px;
    margin-bottom: 4px;
    background-color: #f0f0f0;
    transition: opacity 0.2s, transform 0.2s;
}

.participant-item.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

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

.tables-list,
.dormitories-list {
    columns: 4 150px;
    column-gap: 12px;
}
.conference-tables-layout,
.dormitory-layout,
.conference-activity-layout,
.conference-staff-layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

a.sort-button {
    display: inline-block;
    color: #000;
    font-size: 12px;
}

@media (min-width: 400px) {
    .conference-tables-layout,
    .dormitory-layout,
    .conference-activity-layout,
    .conference-staff-layout {
        flex-direction: row;
        align-items: flex-start;
    }

    .conference-tables-table,
    .dormitory-table,
    .conference-activity-table,
    .conference-staff-table {
        flex: 1 1 50%;
        min-width: 0;
    }

    .conference-dormitory-sources-layout,
    .conference-activity-sources-layout,
    .participants-no-staff {
        flex: 0 0 40%;
        max-width: 40%;
        position: sticky;
        top: 1rem;
        align-self: flex-start;
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
    }

    .dormitory-table {
        flex: 1 1 80%;
    }

    .conference-dormitory-sources-layout {
        flex: 0 0 20%;
        max-width: 20%;
    }
}

.tables-item,
.dormitory-item {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 10px;
    box-sizing: border-box;
    break-inside: avoid;
    margin-bottom: 12px;
    width: 100%;
    display: inline-block;
}


tr[data-id].drag-over {
    background-color: #e3f2fd;
    outline: 2px dashed #2196f3;
    outline-offset: -2px;
}

.participants-no-dormitory.drag-over,
.participants-no-staff.drag-over,
.participants-for-activity.drag-over,
.staff-for-activity.drag-over {
    background-color: #fff3cd;
    outline: 2px dashed #ffc107;
    outline-offset: -2px;
}

td.bed-drop-target {
    position: relative;
}

td.bed-drop-target.bed-drag-over {
    background-color: #c8e6c9;
    outline: 2px solid #4caf50;
    outline-offset: -2px;
}

td.beds-overcapacity {
    color: red;
    font-weight: bold;
}

td .seats-overcapacity {
    color: red;
    font-weight: bold;
}

.form-column .form-fieldset-header :has(.form-fieldset-title-content.collapsed) {
  padding-block-start: 0;
}

.ea-dark-scheme .participant-item {
    background-color: #333;
}

.ea-dark-scheme .participant-item .badge {
    background-color: rgb(0, 129, 155) !important;
}

.ea-dark-scheme .scrollable-table table.datagrid thead th {
    background-color: black;
}
.ea-dark-scheme .scrollable-table .content-panel-footer {
    background-color: black;
}

.ea-dark-scheme .bg-light {
    background-color: black !important;
}

.ea-dark-scheme i.fa {
    color: white !important;
}

.datagrid thead th {
    padding: 0.5rem;
}

.form-fieldset.statistics .field-label {
    inline-size: 70%
}
.form-fieldset.statistics .field-value {
    min-inline-size: 30%;
}
