/* Modal Overlay (Background Dim) */
.modal-overlay {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
}

/* Visible state triggered by function */
.modal-overlay.active {
  display: flex;
}

/* Modal Window Container */
.modal-content {
  background: white;
  width: 100%;
  max-width: 880px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  animation: modalFadeIn 0.25s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Modal Header */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
  background-color: #ffffff;
  z-index: 10;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.25rem;
  color: #0f172a;
}

.btn-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #64748b;
  cursor: pointer;
  line-height: 1;
}

.btn-close:hover {
  color: #0f172a;
}

/* Modal Body & Table */
.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex-grow: 1;
}

.menu-table {
  width: 100%;
  border-collapse: collapse;
}

.menu-table th,
.menu-table td {
  padding: 12px 8px;
  text-align: left;
  border-bottom: 1px solid #f1f5f9;
}

.menu-table th {
  font-size: 0.875rem;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.05em;
  position: sticky;
  top: -20px;
  background-color: white;
  z-index: 1;
}

.menu-table td {
  color: #334155;
  font-weight: 500;
}

.price-col {
  text-align: right !important;
  font-weight: 600;
  color: #0f172a !important;
  white-space: nowrap;
  width: 1%;
}

/* Modal Footer */
.modal-footer {
  padding: 12px 24px;
  background-color: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  flex-shrink: 0;
}

.btn-secondary {
  background: white;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
}

.btn-secondary:hover {
  background-color: #f1f5f9;
}