/* ----------------------------------------------------------
   Group weekly table layout
---------------------------------------------------------- */

.eac-gw-wrapper {
    margin-top: 18px;
}

.eac-gw-table-container {
    margin-top: 12px;
    background-color: #020617;
    border-radius: 12px;
    border: 1px solid #111827;
    padding: 6px 8px;
    overflow-x: auto;
}

.eac-gw-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto; /* allow variable column widths */
    min-width: 720px;
    font-size: 0.85rem;
}

.eac-gw-table thead th {
    text-align: center;
    padding: 6px 4px;
    border: 1px solid #0b1120;
    color: #e5e7eb;
}

.eac-gw-name-header {
    text-align: left;
    width: 220px;
}

.eac-gw-day-header {
    font-weight: 500;
}

.eac-gw-table tbody tr {
    height: 40px;
}

.eac-gw-name-cell {
    padding: 4px 6px;
    border: 1px solid #0b1120;
    white-space: nowrap;
    font-size: 0.9rem;
    font-weight: 500;
}

.eac-gw-day-cell {
    padding: 2px 3px;
    border: 1px solid #0b1120;
    vertical-align: middle;
}

.eac-gw-day-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 3px;
}

/* Slightly smaller event pill for the grid cells */
.eac-gw-day-inner .eac-event-block {
    font-size: 0.7rem;
    padding: 2px 4px;
}

/* Flag columns ER / IE / RX / IP */
.eac-gw-table th.eac-gw-flag-header,
.eac-gw-table td.eac-gw-flag-cell {
    width: 12px;
    min-width: 12px;
    max-width: 12px;
    text-align: center;
    font-size: 0.65rem;
    padding: 0;
}

/* Group Weekly Shift Overview */

.eac-gw-shift-overview {
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
}

.eac-gw-shift-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.eac-gw-shift-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.15rem;
}

.eac-gw-shift-label {
    font-weight: 600;
    width: 80px;
    flex-shrink: 0;
}

.eac-gw-shift-members > div {
    margin-bottom: 0.1rem;
}

/* Light theme overrides */

.eac-wrapper.eac-theme-light .eac-gw-table-container {
    background-color: #e5f0ff;
    border-color: #cbd5f5;
}

.eac-wrapper.eac-theme-light .eac-gw-table thead th {
    background-color: #dbeafe;
    color: #111827;
    border-color: #cbd5f5;
}

.eac-wrapper.eac-theme-light .eac-gw-table th,
.eac-wrapper.eac-theme-light .eac-gw-table td {
    border-color: #cbd5f5;
}

.eac-wrapper.eac-theme-light .eac-gw-name-cell {
    border-right-color: #cbd5f5;
}

.eac-wrapper.eac-theme-light .eac-gw-day-cell {
    border-left-color: #cbd5f5;
    border-bottom-color: #cbd5f5;
}

/* Responsive */

@media (max-width: 640px) {
    .eac-gw-name-header {
        width: 160px;
    }
}
