/* Stili aggiuntivi per la piantina tavoli interattiva */

#tavoliSection {
  animation: fadeIn 0.5s ease-in;
}

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

#piantinaTavoli {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.tavolo-btn {
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.tavolo-btn:active {
  transform: scale(0.95) !important;
}

#tavoloSelezionato {
  animation: slideIn 0.3s ease-out;
  padding: 12px 20px;
  background: rgba(59, 130, 246, 0.1);
  border-left: 4px solid #3b82f6;
  border-radius: 8px;
}

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

#tavoloErrore {
  animation: shake 0.5s ease;
  padding: 12px 20px;
  background: rgba(239, 68, 68, 0.1);
  border-left: 4px solid #ef4444;
  border-radius: 8px;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Responsive per mobile */
@media (max-width: 768px) {
  #piantinaTavoli {
    padding: 5px;
    max-width: 100% !important;
  }
  
  #tavoliContainer {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: 700 / 1100;
  }
  
  .tavolo-btn {
    width: 32px !important;
    height: 32px !important;
    font-size: 11px !important;
    border-width: 2px !important;
  }
  
  .tavolo-btn div:first-child {
    font-size: 10px !important;
  }
  
  .tavolo-btn div:last-child {
    font-size: 7px !important;
  }
}

@media (max-width: 480px) {
  #piantinaTavoli {
    padding: 3px;
  }
  
  #tavoliContainer {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: 700 / 1100;
  }
  
  .tavolo-btn {
    width: 28px !important;
    height: 28px !important;
    font-size: 9px !important;
    border-width: 2px !important;
  }
  
  .tavolo-btn div:first-child {
    font-size: 9px !important;
  }
  
  .tavolo-btn div:last-child {
    font-size: 6px !important;
  }
}

/* Loading state per la piantina */
.tavoli-loading {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}

.tavoli-loading::after {
  content: '...';
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0%, 20% { content: '.'; }
  40% { content: '..'; }
  60%, 100% { content: '...'; }
}
