/* Classroom Seating - Main Styles */

/* General wrap */
.cs-wrap { max-width: 960px; margin: 0 auto; padding: 20px 0; font-family: inherit; }
.cs-admin-wrap { font-family: inherit; }

/* Notice */
.cs-notice { padding: 14px 18px; border-left: 4px solid #2271b1; background: #f0f6ff; border-radius: 4px; margin: 16px 0; }
.cs-notice a { color: #2271b1; }
.cs-error { border-left-color: #d63638; background: #fff0f0; }

/* Table */
.cs-table { width: 100%; border-collapse: collapse; margin-top: 16px; }
.cs-table th, .cs-table td { padding: 10px 14px; border-bottom: 1px solid #e5e7eb; text-align: left; }
.cs-table thead th { background: #f5f5f5; font-weight: 600; }
.cs-table tbody tr:hover { background: #fafafa; }

/* Buttons */
.cs-btn { display: inline-block; padding: 8px 16px; background: #2271b1; color: #fff; border-radius: 4px; text-decoration: none; border: none; cursor: pointer; font-size: 14px; transition: background .2s; }
.cs-btn:hover { background: #135e96; color: #fff; }
.cs-btn-danger { background: #d63638; margin-left: 10px; }
.cs-btn-danger:hover { background: #b02929; }
.cs-btn-refresh { background: #2271b1; margin-bottom: 16px; }

/* Back link */
.cs-back { display: inline-block; margin-bottom: 12px; color: #2271b1; text-decoration: none; font-size: 14px; }
.cs-back:hover { text-decoration: underline; }

/* Session meta */
.cs-meta { color: #555; margin: 0 0 16px; }

/* My seat banner */
.cs-my-seat { background: #e8f5e9; border: 1px solid #4caf50; border-radius: 6px; padding: 10px 16px; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }

/* Legend */
.cs-legend { display: flex; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.cs-legend-item { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #333; }
.cs-legend-item::before { content: ''; display: inline-block; width: 22px; height: 22px; border-radius: 4px; }
.cs-free-demo::before   { background: #e8f5e9; border: 2px solid #4caf50; }
.cs-mine-demo::before   { background: #1565c0; border: 2px solid #0d47a1; }
.cs-taken-demo::before  { background: #ffebee; border: 2px solid #ef5350; }
.cs-blocked-demo::before { background: #eeeeee; border: 2px dashed #bdbdbd; }

/* Board */
.cs-board { background: #fafafa; border: 1px solid #e0e0e0; border-radius: 8px; padding: 20px; margin-top: 10px; }
.cs-admin-board { margin-top: 20px; }

/* Teacher label */
.cs-teacher-label { text-align: center; background: #e3f2fd; border: 1px solid #90caf9; border-radius: 6px; padding: 8px 16px; margin-bottom: 20px; font-weight: 600; color: #1565c0; }

/* Grid */
.cs-grid { display: grid; gap: 8px; }

/* Seat */
.cs-seat {
    aspect-ratio: 1;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform .15s, box-shadow .15s;
    min-width: 44px;
    min-height: 44px;
    position: relative;
}
.cs-seat:hover:not(.cs-blocked):not(.cs-taken) { transform: scale(1.08); box-shadow: 0 2px 8px rgba(0,0,0,.15); }

.cs-seat-id   { font-size: 11px; font-weight: 700; line-height: 1; }
.cs-seat-icon { font-size: 14px; line-height: 1; margin-top: 2px; }
.cs-seat-name { font-size: 9px; line-height: 1.2; text-align: center; overflow: hidden; max-width: 100%; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; margin-top: 2px; }

/* Seat states */
.cs-free    { background: #e8f5e9; border-color: #4caf50; color: #2e7d32; }
.cs-mine    { background: #1565c0; border-color: #0d47a1; color: #fff; }
.cs-taken   { background: #ffebee; border-color: #ef5350; color: #b71c1c; cursor: not-allowed; }
.cs-blocked { background: #eeeeee; border-color: #bdbdbd; color: #9e9e9e; cursor: not-allowed; border-style: dashed; }

/* Message */
.cs-message { padding: 12px 16px; border-radius: 6px; margin-top: 14px; font-weight: 500; }
.cs-message.cs-success { background: #e8f5e9; color: #2e7d32; border: 1px solid #4caf50; }
.cs-message.cs-error   { background: #ffebee; color: #b71c1c; border: 1px solid #ef5350; }

/* Admin layout preview */
.cs-admin-grid-preview { background: #fafafa; border: 1px solid #e0e0e0; border-radius: 8px; padding: 20px; max-width: 720px; margin: 16px 0; }
.cs-admin-grid-preview .cs-seat { cursor: pointer; }
.cs-admin-grid-preview .cs-seat.cs-blocked-toggle { background: #eeeeee; border-color: #bdbdbd; color: #9e9e9e; border-style: dashed; }

/* Responsive */
@media (max-width: 600px) {
    .cs-grid { gap: 5px; }
    .cs-seat { min-width: 32px; min-height: 32px; }
    .cs-seat-id { font-size: 9px; }
    .cs-legend { gap: 10px; }
}
