/* =========================================================
   Team Seat Manager — Front-end Styles v1.5.0
   Author: Zukhanye Creative Consulting
   ========================================================= */

.tsm-wrapper { max-width: 100%; font-family: inherit; }

/* Header */
.tsm-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 24px; flex-wrap: wrap; }
.tsm-header__title { margin: 0 0 2px; font-size: 1.2rem; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tsm-header__sub { margin: 0; color: #6b7280; font-size: 0.875rem; }

/* Seat bar */
.tsm-seat-bar { display: flex; align-items: center; gap: 10px; flex: 1; max-width: 260px; }
.tsm-seat-bar__track { flex: 1; background: #e5e7eb; border-radius: 999px; height: 8px; overflow: hidden; }
.tsm-seat-bar__fill { height: 100%; background: #2563eb; border-radius: 999px; transition: width 0.4s ease; }
.tsm-seat-bar__fill--full { background: #dc2626; }
.tsm-seat-bar__label { font-size: 0.78rem; font-weight: 700; color: #6b7280; white-space: nowrap; }

/* Roster */
.tsm-roster { border: 1px solid #e5e7eb; border-radius: 10px; overflow: hidden; width: 100%; }
.tsm-roster-header,
.tsm-seat { display: grid; grid-template-columns: 32px 40px 130px 120px 120px 1fr 80px 90px; align-items: center; gap: 10px; padding: 0 16px; }
.tsm-roster-header { padding-top: 10px; padding-bottom: 10px; background: #f9fafb; border-bottom: 2px solid #e5e7eb; font-size: 0.72rem; font-weight: 700; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.06em; }
.tsm-seat { border-bottom: 1px solid #f3f4f6; min-height: 58px; transition: background 0.12s ease; }
.tsm-seat:last-child { border-bottom: none; }
.tsm-seat--filled { background: #fff; }
.tsm-seat--filled:hover { background: #f9fafb; }
.tsm-seat--empty { background: #fafafa; }
.tsm-seat--active { background: #eff6ff !important; }

/* Seat number */
.tsm-seat__number { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: #e5e7eb; font-size: 0.72rem; font-weight: 700; color: #6b7280; }
.tsm-seat__number--empty { background: #f3f4f6; color: #9ca3af; }

/* Avatar */
.tsm-avatar { width: 34px !important; height: 34px !important; border-radius: 50%; display: block; }
.tsm-seat__avatar--empty { width: 34px; height: 34px; border-radius: 50%; background: #e5e7eb; display: flex; align-items: center; justify-content: center; }
.tsm-avatar-placeholder { font-size: 0.9rem; color: #9ca3af; }

/* Cell text */
.tsm-seat__value { font-size: 0.875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.tsm-seat__value--muted { color: #6b7280; }

/* Column alignment */
.tsm-col--status { text-align: center; }
.tsm-col--action { text-align: right; }

/* Badges */
.tsm-badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
.tsm-badge--inline { font-size: 0.65rem; vertical-align: middle; }
.tsm-badge--active    { background: #dcfce7; color: #15803d; }
.tsm-badge--empty     { background: #f3f4f6; color: #9ca3af; }
.tsm-badge--onhold    { background: #fef9c3; color: #854d0e; }
.tsm-badge--cancelled { background: #fee2e2; color: #991b1b; }

/* Inputs */
.tsm-input { width: 100%; padding: 7px 10px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 0.82rem; outline: none; background: #fff; transition: border-color 0.15s ease, box-shadow 0.15s ease; box-sizing: border-box; font-family: inherit; }
.tsm-input:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.tsm-input--error { border-color: #dc2626 !important; box-shadow: 0 0 0 3px rgba(220,38,38,0.1) !important; }
.tsm-input--suggested { color: #6b7280; font-style: italic; }

/* Buttons */
.tsm-btn { display: inline-flex; align-items: center; justify-content: center; padding: 8px 14px; border-radius: 6px; border: none; cursor: pointer; font-size: 0.82rem; font-weight: 600; line-height: 1; transition: opacity 0.15s, background 0.15s, transform 0.1s; white-space: nowrap; font-family: inherit; }
.tsm-btn:hover { opacity: 0.88; transform: translateY(-1px); }
.tsm-btn:active { transform: translateY(0); }
.tsm-btn--primary { background: #2563eb; color: #fff; }
.tsm-btn--primary:disabled, .tsm-btn--primary[disabled] { background: #93c5fd; cursor: not-allowed; transform: none; opacity: 1; }
.tsm-btn--ghost { background: transparent; border: 1px solid currentColor; }
.tsm-btn--danger { color: #dc2626; border-color: #fca5a5; }
.tsm-btn--danger:hover { background: #fee2e2; }
.tsm-btn--lg { padding: 12px 28px; font-size: 1rem; }

/* Roster footer */
.tsm-roster-footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-top: 20px; flex-wrap: wrap; }
.tsm-footer-hint { flex: 1; }

/* Hints */
.tsm-hint { color: #6b7280; font-size: 0.85rem; margin: 0 0 6px; }
.tsm-hint--small { font-size: 0.78rem; margin-bottom: 0; }

/* Notices */
.tsm-notice { padding: 14px 18px; border-radius: 8px; margin-bottom: 20px; }
.tsm-notice p { margin: 0; font-size: 0.9rem; }
.tsm-notice--info    { background: #eff6ff; border-left: 4px solid #2563eb; color: #1e40af; }
.tsm-notice--warning { background: #fffbeb; border-left: 4px solid #f59e0b; color: #92400e; }

/* Product badge */
.tsm-product-badge { display: inline-flex; align-items: center; gap: 8px; background: #eff6ff; border: 1px solid #bfdbfe; color: #1d4ed8; padding: 8px 14px; border-radius: 8px; font-size: 0.9rem; font-weight: 600; margin: 10px 0; }
.tsm-product-badge__icon { font-size: 1.1rem; }

/* Member card (team member read-only view) */
.tsm-member-card { border: 1px solid #e5e7eb; border-radius: 10px; padding: 24px; background: #fff; max-width: 480px; }
.tsm-member-card__title { margin: 0 0 16px; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #9ca3af; }
.tsm-member-card__body { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.tsm-avatar--lg { width: 56px !important; height: 56px !important; border-radius: 50%; flex-shrink: 0; }
.tsm-member-card__name { margin: 0 0 4px; font-weight: 700; font-size: 1rem; }
.tsm-member-card__email { margin: 0; font-size: 0.875rem; color: #6b7280; }
.tsm-member-card__email a { color: #2563eb; text-decoration: none; }
.tsm-member-card__email a:hover { text-decoration: underline; }
.tsm-member-card__note { margin: 0; font-size: 0.8rem; color: #9ca3af; border-top: 1px solid #f3f4f6; padding-top: 14px; }

/* Responsive */
@media ( max-width: 860px ) {
    .tsm-roster-header { display: none; }
    .tsm-seat { grid-template-columns: 28px 34px 1fr 1fr; grid-template-rows: auto auto; padding: 12px 14px; gap: 8px; }
    .tsm-col--email, .tsm-col--status, .tsm-col--action { grid-column: 3 / span 2; }
    .tsm-col--action { text-align: left; }
    .tsm-roster-footer { flex-direction: column; align-items: flex-start; }
    .tsm-btn--lg { width: 100%; }
}

@media ( max-width: 480px ) {
    .tsm-seat { grid-template-columns: 28px 1fr; }
    .tsm-col--avatar { display: none; }
    .tsm-col--username, .tsm-col--name, .tsm-col--email, .tsm-col--status, .tsm-col--action { grid-column: 2; }
}
