/* ═══════════════════════════════════════════════════════════════
   WAITRESS ROLE - Mobile-First Compact Design
   ═══════════════════════════════════════════════════════════════ */

.waitress-interface {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  background: linear-gradient(180deg, #1a0f2e 0%, #0d0618 100%);
  overflow: hidden;
  position: relative;
}

/* ═══════════════════════════════════════════════════════════════
   STATION NAV - Larger buttons at top
   ═══════════════════════════════════════════════════════════════ */

.waitress-station-nav {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: rgba(45, 27, 78, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  position: relative;
  z-index: 101; /* Above pos-container-wrapper */
}

.station-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 8px;
  border-radius: 12px;
  border: 2px solid transparent;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.2s;
}

.station-btn .btn-icon {
  font-size: 1.5rem;
}

.station-btn .btn-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text);
}

.station-btn.active {
  background: var(--color-secondary);
  border-color: var(--color-secondary-light);
}

.station-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ═══════════════════════════════════════════════════════════════
   SETTINGS BUTTON - Bottom Right Corner
   ═══════════════════════════════════════════════════════════════ */

.settings-btn-corner {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: rgba(45, 27, 78, 0.95);
  border: 2px solid rgba(255, 255, 255, 0.2);
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  z-index: 100;
}

.settings-btn-corner:hover {
  background: rgba(45, 27, 78, 1);
  transform: scale(1.05);
}

/* ═══════════════════════════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════════════════════════ */

.waitress-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
}

/* ═══════════════════════════════════════════════════════════════
   HOSTESS VIEW - COMPACT
   ═══════════════════════════════════════════════════════════════ */

.hostess-view {
  display: flex;
  flex-direction: column;
  padding: 12px;
  gap: 12px;
  min-height: 100%;
}

/* Queue Header */
.queue-header-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

.queue-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
}

.queue-badge {
  background: var(--color-secondary);
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Guest Queue - Horizontal Scroll */
.guest-queue-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 4px 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.guest-queue-scroll::-webkit-scrollbar {
  display: none;
}

.empty-queue-compact {
  width: 100%;
  text-align: center;
  padding: 16px;
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

/* Guest Chips - Taller for easier pressing */
.guest-chip {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid transparent;
  border-radius: 28px;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 56px;
}

.guest-chip.selected {
  background: rgba(78, 205, 196, 0.2);
  border-color: var(--color-secondary);
}

.guest-chip.no-fit {
  opacity: 0.5;
}

.guest-chip.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.chip-size {
  font-weight: 800;
  font-size: 1rem;
  color: var(--color-text);
}

.chip-time {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.chip-check {
  color: var(--color-secondary);
  font-weight: 700;
  font-size: 1.1rem;
}

/* Bar preference styling */
.guest-chip.prefers-bar {
  background: linear-gradient(135deg, rgba(155, 89, 182, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
  border-color: rgba(155, 89, 182, 0.4);
}

.guest-chip.prefers-bar.selected {
  background: linear-gradient(135deg, rgba(155, 89, 182, 0.3) 0%, rgba(78, 205, 196, 0.2) 100%);
  border-color: var(--color-accent-purple);
  box-shadow: 0 0 12px rgba(155, 89, 182, 0.3);
}

.chip-preference {
  font-size: 1rem;
  animation: pulse-beer 2s infinite;
}

@keyframes pulse-beer {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Tables Section */
.tables-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
}

.tables-header-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

.tables-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
}

.legend-compact {
  display: flex;
  gap: 6px;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.legend-dot.open {
  background: #22c55e;
}

.legend-dot.occupied {
  background: #eab308;
}

.legend-dot.dirty {
  background: #ef4444;
}

.legend-dot.ready {
  background: #3b82f6;
}

/* Seating Chart Grid - 3 columns, fills remaining space */
.seating-chart-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  align-content: start;
}

@media (min-width: 600px) {
  .seating-chart-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Table Tiles - Bigger buttons with badges */
.table-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 3px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  min-height: 130px;
  width: 100%;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  overflow: hidden;
}

/* Bar seat tile variation - just square shape, colors handled by status classes */
.table-tile.bar-seat-tile .table-tile-shape {
  border-radius: 8px;
}

.table-tile:active {
  transform: scale(0.95);
  background: rgba(255, 255, 255, 0.1);
}

.table-tile:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
}

.table-tile.selected {
  border-color: #FF6B35;
  background: rgba(255, 107, 53, 0.2);
  box-shadow: 0 0 12px rgba(255, 107, 53, 0.3);
}

.table-tile.too-small {
  opacity: 0.4;
}

.table-tile.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.table-tile.disabled:hover {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.05);
}

.table-tile-shape {
  width: 72px;
  height: 72px;
  min-width: 72px;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 2rem;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
  box-sizing: border-box;
  margin-top: 4px;
}

.table-tile-shape.round {
  border-radius: 50%;
}

.table-tile-shape.square {
  border-radius: 8px;
}

.table-tile-shape.open {
  background: #22c55e;
  border: 3px solid #16a34a;
}

.table-tile-shape.occupied {
  background: #eab308;
  border: 3px solid #ca8a04;
}

.table-tile-shape.dirty {
  background: #ef4444;
  border: 3px solid #dc2626;
}

.table-tile-shape.ready {
  background: #3b82f6;
  border: 3px solid #2563eb;
}

/* Center number in tile shape */
.tile-center-number {
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Table name label (bottom) - Bar 1, Table 1, etc */
.table-name-label {
  font-size: 0.8rem;
  color: var(--color-text);
  margin-top: 8px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  max-width: 100%;
  padding: 0 4px;
  line-height: 1.2;
}

.selected-indicator {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  background: #FF6B35;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: white;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.locked-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(20px, 8vw, 28px);
  opacity: 0.95;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

/* ═══════════════════════════════════════════════════════════════
   BOTTOM ACTION BAR
   ═══════════════════════════════════════════════════════════════ */

.waitress-actions {
  padding: 12px;
  background: rgba(45, 27, 78, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.seat-confirmation {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.seat-btn {
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.seat-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}

.seat-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.cancel-btn {
  width: 100%;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
}

.cancel-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ═══════════════════════════════════════════════════════════════
   WALKING SCREEN
   ═══════════════════════════════════════════════════════════════ */

.walking-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 20px;
  text-align: center;
}

.walking-animation {
  font-size: 4rem;
  animation: bounce 0.6s infinite alternate;
}

@keyframes bounce {
  from { transform: translateY(0); }
  to { transform: translateY(-10px); }
}

.walking-text {
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 16px;
}

.walking-subtext {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: 8px;
}

/* Walking Banner - shown at top while walking but doesn't block UI */
.walking-banner {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, var(--color-secondary) 0%, var(--color-accent-teal) 100%);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 50;
  pointer-events: none !important;
  user-select: none;
  animation: slideDown 0.3s ease;
}

.walking-banner .walking-icon {
  font-size: 1.25rem;
  animation: bounce 0.6s infinite alternate;
}

.walking-banner .walking-text {
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0;
}

@keyframes slideDown {
  from {
    transform: translateX(-50%) translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

/* ═══════════════════════════════════════════════════════════════
   POS CATEGORY GRID - New grid-based category selection
   ═══════════════════════════════════════════════════════════════ */

.pos-category-grid {
  padding: 16px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.pos-category-grid .grid-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 16px 0;
  text-align: center;
}

.category-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  flex: 1;
  overflow-y: auto;
}

.category-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px;
  background: var(--color-bg-card);
  border: 2px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: all var(--transition-fast);
  aspect-ratio: 1/1;
  min-height: unset;
  height: auto;
}

.category-tile:hover {
  border-color: var(--color-secondary);
  transform: translateY(-2px);
}

.category-tile:active {
  transform: scale(0.98);
}

.category-tile .category-icon {
  font-size: 1.75rem;
  line-height: 1;
}

.category-tile .category-name {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--color-text);
  text-align: center;
  line-height: 1.2;
}

/* Menu header with back navigation */
.pos-menu-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.pos-menu-header .category-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pos-back-to-items {
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: var(--color-text);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.pos-back-to-items:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Back to categories button */
[data-action="back-to-categories"] {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: var(--color-text);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

[data-action="back-to-categories"]:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ═══════════════════════════════════════════════════════════════
   TABLE SERVICE VIEW
   ═══════════════════════════════════════════════════════════════ */

.table-service-view {
  padding: 12px;
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.table-header h3 {
  font-size: 1rem;
  margin: 0;
}

.back-to-map-btn {
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 8px;
  color: var(--color-text);
  font-size: 0.75rem;
  cursor: pointer;
}

.service-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.service-tab {
  flex: 1;
  padding: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid transparent;
  border-radius: 8px;
  color: var(--color-text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.service-tab.active {
  background: rgba(78, 205, 196, 0.2);
  border-color: var(--color-secondary);
  color: var(--color-text);
}

/* ═══════════════════════════════════════════════════════════════
   PASS VIEW
   ═══════════════════════════════════════════════════════════════ */

.pass-view {
  padding: 12px;
}

.pass-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.pass-header h3 {
  font-size: 1rem;
  margin: 0;
}

.plates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
}

.plate-card {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.plate-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.plate-table {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 4px;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ═══════════════════════════════════════════════════════════════ */

/* Small phones */
@media (max-width: 350px) {
  .seating-chart-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 8px;
  }
  
  .table-tile {
    padding: 8px 4px;
  }
}

/* Tablets and larger */
@media (min-width: 600px) {
  .hostess-view {
    padding: 16px;
    gap: 16px;
  }
  
  .seating-chart-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    padding: 16px;
  }
}

/* Large tablets */
@media (min-width: 768px) {
  .seating-chart-grid {
    grid-template-columns: repeat(8, 1fr);
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .seating-chart-grid {
    grid-template-columns: repeat(10, 1fr);
    max-width: 900px;
    margin: 0 auto;
  }
}
