/* src/css/pages/cocina.css */

body {
  background-color: var(--background);
  color: var(--foreground);
  overflow-x: hidden;
  font-family: 'Outfit', sans-serif;
}

/* Header */
.cocina-header {
  padding: 1.2rem 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background-color: rgba(10, 11, 15, 0.4);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.cocina-header-title-box {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.cocina-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: bold;
  margin: 0;
  color: var(--foreground);
}

.cocina-status {
  color: var(--success);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* Kanban Board Layout */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  padding: 2.5rem;
  height: calc(100vh - 80px);
  align-items: start;
}

.kanban-column {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 160px);
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.kanban-header {
  padding: 1.2rem;
  text-align: center;
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 700;
  border-bottom: 2px solid;
  background: rgba(255, 255, 255, 0.02);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.col-pendientes .kanban-header { border-bottom-color: var(--danger); color: var(--danger); }
.col-preparacion .kanban-header { border-bottom-color: var(--warning); color: var(--warning); }
.col-listos .kanban-header { border-bottom-color: var(--success); color: var(--success); }

.kanban-body {
  padding: 1.2rem;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

/* Scrollbar styles for Kanban body */
.kanban-body::-webkit-scrollbar {
  width: 6px;
}
.kanban-body::-webkit-scrollbar-track {
  background: transparent;
}
.kanban-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}
.kanban-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Ticket Card Styling */
.ticket {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.2rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: inset 0 1px 1.5px rgba(255, 255, 255, 0.2), 0 4px 15px rgba(0,0,0,0.3);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  animation: ticketEntrance 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Columna-specific styles */
.col-pendientes .ticket {
  border-left: 4px solid var(--danger);
}
.col-pendientes .ticket:hover {
  transform: translateY(-4px);
  border-color: rgba(244, 63, 94, 0.4);
  box-shadow: inset 0 1.5px 2px rgba(255, 255, 255, 0.3), 0 0 25px rgba(244, 63, 94, 0.15);
}

.col-preparacion .ticket {
  border-left: 4px solid var(--warning);
}
.col-preparacion .ticket:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: inset 0 1.5px 2px rgba(255, 255, 255, 0.3), 0 0 25px rgba(245, 158, 11, 0.15);
}

.col-listos .ticket {
  border-left: 4px solid var(--success);
}
.col-listos .ticket:hover {
  transform: translateY(-4px);
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: inset 0 1.5px 2px rgba(255, 255, 255, 0.3), 0 0 25px rgba(16, 185, 129, 0.15);
}

@keyframes ticketEntrance {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.ticket-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  border-bottom: 1px dashed var(--border);
  padding-bottom: 0.6rem;
  margin-bottom: 0.8rem;
}

.ticket-id {
  font-weight: bold;
  font-family: monospace;
  color: var(--foreground);
  font-size: 1.1rem;
}

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

.ticket-tipo {
  font-size: 0.8rem;
  font-weight: bold;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  display: inline-block;
  text-transform: uppercase;
}

.ticket-tipo.domicilio {
  background: rgba(52, 152, 219, 0.1);
  color: #3498db;
  border: 1px solid rgba(52, 152, 219, 0.3);
}

.ticket-tipo.llevar {
  background: rgba(155, 89, 182, 0.1);
  color: #9b59b6;
  border: 1px solid rgba(155, 89, 182, 0.3);
}

.ticket-tipo.mesa {
  background: rgba(234, 88, 12, 0.1);
  color: var(--accent);
  border: 1px solid rgba(234, 88, 12, 0.3);
}

.ticket-client-info {
  font-size: 0.85rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
  padding: 0.6rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 0.6rem;
  margin-bottom: 0.6rem;
  line-height: 1.4;
  font-weight: 600;
}

.ticket-divider {
  border-top: 1px dashed var(--border);
  margin: 0.8rem 0;
}

.ticket-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.ticket-item {
  font-size: 0.95rem;
  color: var(--foreground);
  line-height: 1.4;
  font-weight: 600;
}

.item-qty {
  font-weight: bold;
  color: var(--accent);
  margin-right: 0.4rem;
}

.item-notes {
  display: block;
  color: var(--warning);
  font-size: 0.85rem;
  margin-left: 1.5rem;
  font-style: italic;
  background: rgba(245, 158, 11, 0.05);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  border-left: 2px solid var(--warning);
  margin-top: 0.2rem;
  font-weight: 600;
}

.ticket-footer {
  margin-top: 1.2rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.ticket-btn {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
}

.btn-start {
  background: linear-gradient(135deg, #ffb74d 0%, #f57c00 100%);
  color: #050507;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.btn-start:hover {
  background: linear-gradient(135deg, #ffe082 0%, #ffb74d 100%);
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4);
  transform: translateY(-2px);
}

.btn-finish {
  background: linear-gradient(135deg, #81c784 0%, #388e3c 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-finish:hover {
  background: linear-gradient(135deg, #a5d6a7 0%, #66bb6a 100%);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
  transform: translateY(-2px);
}

.btn-dispatch {
  background: linear-gradient(135deg, #ff7043 0%, #f4511e 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(244, 81, 30, 0.25);
}

.btn-dispatch:hover {
  background: linear-gradient(135deg, #ff8a65 0%, #ff5722 100%);
  box-shadow: 0 6px 16px rgba(244, 81, 30, 0.4);
  transform: translateY(-2px);
}

/* Alarm Modal Alerta */
.alarma-overlay {
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85) !important;
  backdrop-filter: blur(8px);
}

.alarma-overlay.open {
  display: flex !important;
}

.alarma-modal-card {
  background: #1a0f0f; /* Tono rojizo oscuro */
  border: 2px solid var(--danger);
  border-radius: 20px;
  width: 90%;
  max-width: 500px;
  padding: 3rem 2rem;
  box-shadow: 0 0 50px rgba(239, 68, 68, 0.3);
  text-align: center;
  animation: modalPulse 1.5s infinite ease-in-out, modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalPulse {
  0% { box-shadow: 0 0 30px rgba(239, 68, 68, 0.2); border-color: var(--danger); }
  50% { box-shadow: 0 0 60px rgba(239, 68, 68, 0.5); border-color: #f87171; }
  100% { box-shadow: 0 0 30px rgba(239, 68, 68, 0.2); border-color: var(--danger); }
}

.alarma-title {
  color: var(--danger);
  font-size: 2.2rem;
  font-weight: 900;
  margin-bottom: 1rem;
  font-family: 'Playfair Display', serif;
  animation: textFlash 1s infinite alternate;
}

@keyframes textFlash {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0.8; transform: scale(1.03); }
}

.alarma-text {
  font-size: 1.1rem;
  color: var(--foreground);
  margin-bottom: 2rem;
  opacity: 0.9;
}

.btn-apagar-alarma {
  font-size: 1.1rem;
  padding: 0.8rem 2.5rem;
  background: var(--success);
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 9999px;
  font-weight: bold;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-apagar-alarma:hover {
  background: #059669;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

@media (max-width: 768px) {
  .cocina-header {
    padding: 1rem 1.5rem;
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  .cocina-header-title-box {
    flex-direction: column;
    gap: 0.5rem;
  }
  .kanban-board {
    padding: 1rem;
    gap: 1.2rem;
    height: auto;
  }
  .kanban-column {
    max-height: none;
  }
}

.ticket-status-ready {
  font-size: 0.85rem;
  color: var(--success);
  font-weight: bold;
  border: 1px solid rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.05);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  display: inline-block;
  text-align: center;
  width: 100%;
}

