/* Reservation Table Styles (Feature 009)
 * Responsive table for displaying all reservations
 * Based on feedback-table styles for consistent design
 */

/* ========================================
   RESERVATIONS SECTION LAYOUT
   ======================================== */

.reservations-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-4);
}

/* Centered header with create button above title */
.section-header--centered {
    display: flex;
    justify-content: center;
    margin-bottom: var(--spacing-6);
}

/* Create reservation button: white text on black background */
.btn-create-reservation {
    background-color: #000;
    color: #fff;
    border: none;
    padding: var(--spacing-4) var(--spacing-8);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-bold);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color var(--duration-fast) var(--ease-out),
                transform var(--duration-fast) var(--ease-out);
    border-radius: 4px;
}

.btn-create-reservation:hover {
    background-color: #333;
    transform: translateY(-1px);
}

.btn-create-reservation:focus {
    outline: 2px solid var(--color-green);
    outline-offset: 2px;
}

.btn-create-reservation:active {
    transform: translateY(0);
}

/* Reservations title */
.reservations-title {
    text-align: center;
    margin-bottom: var(--spacing-4);
    font-size: var(--font-size-lg);
    color: #333 !important;
}

/* ========================================
   TABLE STRUCTURE - Based on feedback-table
   ======================================== */
.reservation-table {
    width: 100%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-collapse: collapse;
}

/* ========================================
   TABLE HEADER
   ======================================== */
.reservation-table__head {
    background: #f8f9fa;
}

.reservation-table__header {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ========================================
   TABLE BODY & ROWS
   ======================================== */
.reservation-table__body {
    background: white;
}

.reservation-table__row {
    border-top: 1px solid #eee;
    transition: background-color 0.2s ease;
}

.reservation-table__row:hover {
    background: #f8f9fa;
}

.reservation-table__row:focus {
    outline: 2px solid #2d7a3e;
    outline-offset: -2px;
}

/* ========================================
   TABLE CELLS
   ======================================== */
.reservation-table__cell {
    padding: 0.6rem 1rem;
    text-align: left;
    color: #333;
    font-size: 0.85rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.reservation-table__cell--clickable {
    cursor: pointer;
}

/* Special styling for headcount column (numeric, right-aligned) */
.reservation-table__cell--headcount {
    text-align: right;
    padding-right: 1.5rem;
}

/* Branch column with badge */
.reservation-table__cell--branch {
    text-align: center;
}

/* ========================================
   BRANCH BADGES (Feature 009)
   Color-coded badges for scout branches
   ======================================== */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
    white-space: nowrap;
}

/* Scouts: Blue */
.badge--scouts {
    background-color: #e3f2fd;
    color: #1565c0;
    border: 1px solid #1565c0;
}

/* Guides: Purple */
.badge--guides {
    background-color: #f3e5f5;
    color: #6a1b9a;
    border: 1px solid #6a1b9a;
}

/* Louveteaux: Orange */
.badge--louveteaux {
    background-color: #fff3e0;
    color: #e65100;
    border: 1px solid #e65100;
}

/* Louvettes: Pink */
.badge--louvettes {
    background-color: #fce4ec;
    color: #c2185b;
    border: 1px solid #c2185b;
}

/* Famille: Light Green */
.badge--famille {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #2e7d32;
}

/* Actions column */
.reservation-table__cell--actions {
    text-align: center;
    white-space: nowrap;
    padding: 0.5rem 1rem;
}

/* ========================================
   ACTION BUTTONS (Edit/Delete)
   ======================================== */
.reservation-table__action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    transition: background-color 0.2s ease, opacity 0.2s ease;
    margin: 0 2px;
    opacity: 0.6;
}

.reservation-table__action-btn:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.08);
}

.reservation-table__action-btn--edit {
    color: #d4a017;
}

.reservation-table__action-btn--edit:hover {
    color: #b8860b;
    background-color: rgba(212, 160, 23, 0.15);
}

.reservation-table__action-btn--delete {
    color: #d32f2f;
}

.reservation-table__action-btn--delete:hover {
    color: #b71c1c;
    background-color: rgba(211, 47, 47, 0.15);
}

/* ========================================
   EMPTY STATE
   ======================================== */
.reservation-table--empty {
    padding: 3rem;
    text-align: center;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.reservation-table--empty p {
    margin: 0.5rem 0;
    color: #999;
    font-size: 1rem;
}

.reservation-table--empty-cta {
    color: #bbb;
    font-size: 0.875rem;
    margin-top: var(--spacing-4);
    font-style: italic;
}

/* ========================================
   LOADING STATE
   ======================================== */
.reservation-table--loading {
    padding: 3rem;
    text-align: center;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.reservation-table--loading p {
    color: #999;
    font-size: 1rem;
}

/* ========================================
   ERROR STATE
   ======================================== */
.reservation-table--error {
    padding: 2rem;
    text-align: center;
    background: #fee;
    color: #c33;
    border-radius: 8px;
}

.reservation-table--error p {
    margin: 0.5rem 0;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Mobile: Horizontal scroll container */
@media (max-width: 767px) {
    .reservation-table {
        display: block;
        overflow-x: auto;
    }

    .reservation-table__header,
    .reservation-table__cell {
        padding: 0.75rem;
        font-size: 0.875rem;
    }
}

/* Tablet (768px and up) */
@media (min-width: 768px) {
    .reservation-table__header,
    .reservation-table__cell {
        padding: 1rem 1.25rem;
    }
}

/* Desktop (1024px and up) */
@media (min-width: 1024px) {
    .reservation-table__header,
    .reservation-table__cell {
        padding: 1rem 1.5rem;
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

/* Focus visible for keyboard navigation */
.reservation-table__row:focus-visible {
    outline: 2px solid #2d7a3e;
    outline-offset: -1px;
}

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
