/* ---------------------- GLOBAL ---------------------- */

body {
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", sans-serif;
  background: #fff8e1;
}

.hidden {
  display: none !important;
}

/* ---------------------- OFFLINE BANNER ---------------------- */

#offlineBanner {
  background: #d9534f;
  color: white;
  padding: 10px;
  text-align: center;
  font-weight: bold;
  display: none;
}

/* ---------------------- HEADER ---------------------- */

.header {
  text-align: center;
  margin-top: 10px;
}

#logo {
  width: 90px;
}

.title {
  text-align: center;
  margin-top: 5px;
}

.title h2 {
  color: #6b3e26;
  font-size: 24px;
}

/* ---------------------- WELCOME SCREEN ---------------------- */

#welcomeScreen {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
  text-align: center;
}

.welcome-card {
  background: #fdf3d0;
  padding: 40px 30px;
  border-radius: 20px;
  max-width: 420px;
  width: 100%;
  border: 3px solid #d4af37;
  box-shadow: 0 0 18px rgba(0,0,0,0.15);
  animation: fadeIn 0.8s ease-out;
}

.welcome-logo {
  width: 110px;
  margin-bottom: 10px;
}

.welcome-title {
  font-size: 32px;
  font-weight: bold;
  color: #6b3e26;
  margin: 10px 0 5px;
}

.welcome-subtitle {
  font-size: 18px;
  color: #8b5a2b;
  margin-bottom: 25px;
}

.welcome-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.welcome-btn {
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 18px;
  cursor: pointer;
  border: none;
  font-weight: bold;
  transition: 0.2s ease;
}

.welcome-btn.primary {
  background: #d4af37;
  color: #4b2e0f;
}

.welcome-btn.primary:hover {
  background: #c49a2c;
}

.welcome-btn.secondary {
  background: #fff;
  border: 2px solid #d4af37;
  color: #6b3e26;
}

.welcome-btn.secondary:hover {
  background: #f7e7c1;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------------------- WELCOME BOX ---------------------- */

.welcome-box {
  text-align: center;
  margin: 20px auto 10px;
  padding: 15px;
  background: #fff3c4;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  border: 2px solid #d4af37;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.welcome-line {
  font-size: 20px;
  font-weight: bold;
  color: #6b3e26;
}

.role-badge {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: bold;
  color: white;
}

.role-admin { background: #d9534f; }
.role-delivery { background: #5cb85c; }
.role-menuhub { background: #f0ad4e; }
.role-display { background: #0275d8; }
.role-guest { background: #999; }

/* ---------------------- SECTION HEADERS ---------------------- */

.section-header {
  text-align: center;
  color: #6b3e26;
  font-size: 20px;
  margin: 30px 0 10px;
  font-weight: bold;
  letter-spacing: 1px;
}

/* ---------------------- TILES ---------------------- */

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 22px;
  padding: 10px 20px 30px;
}

.tile {
  background: linear-gradient(to bottom, #fff7d6, #f2d48a);
  padding: 22px 20px;
  border-radius: 40px;
  text-align: center;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.25s ease;
  color: #5a3515;

  border: 3px solid #d4af37;
  box-shadow:
    0 4px 10px rgba(0,0,0,0.15),
    inset 0 2px 2px rgba(255,255,255,0.9),
    inset 0 -2px 4px rgba(212,175,55,0.4);
}

.tile .icon {
  font-size: 36px;
  margin-bottom: 8px;
  display: block;
}

.tile:hover {
  background: linear-gradient(to bottom, #ffeeb0, #e8c26d);
  box-shadow:
    0 6px 14px rgba(0,0,0,0.25),
    0 0 12px rgba(212,175,55,0.7),
    inset 0 2px 2px rgba(255,255,255,0.95),
    inset 0 -2px 4px rgba(212,175,55,0.5);
  transform: translateY(-3px);
}

.tile:active {
  transform: translateY(2px) scale(0.97);
  box-shadow:
    0 2px 6px rgba(0,0,0,0.2),
    inset 0 2px 4px rgba(0,0,0,0.25);
}

/* Tile color variants */
.tile-green {
  background: linear-gradient(to bottom, #e6f9e6, #a8e0a8);
  border-color: #4caf50;
}

.tile-bronze {
  background: linear-gradient(to bottom, #f7d7b0, #d9a066);
  border-color: #cd7f32;
}

.tile-gold {
  background: linear-gradient(to bottom, #fff7d6, #f2d48a);
  border-color: #d4af37;
}

/* ---------------------- POPUPS ---------------------- */

.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  justify-content: center;
  align-items: center;
}

.popup {
  background: #fff8e1;
  padding: 30px;
  border-radius: 16px;
  border: 3px solid #d4af37;
  width: 90%;
  max-width: 380px;
}

.popup-input {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  border-radius: 8px;
  border: 1px solid #b8860b;
}

.popup-btn {
  width: 100%;
  padding: 12px;
  margin-top: 10px;
  border-radius: 8px;
  border: none;
  font-size: 18px;
  cursor: pointer;
}

.primary-btn { background: #d4af37; color: #4b2e0f; }
.danger-btn { background: #d9534f; color: white; }

.pending {
  background: #ffcc00;
  color: #4b2e0f;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: bold;
  margin-top: 10px;
  text-align: center;
}

/* Delivery Popup Button Colors */
.popup-btn.gold-btn {
  background: #d4af37;
  color: #4b2e0f;
}

.popup-btn.green-btn {
  background: #4caf50;
  color: white;
}

.popup-btn.bronze-btn {
  background: #cd7f32;
  color: white;
}

.popup-btn.red-btn {
  background: #d9534f;
  color: white;
}

/* Online Order Popup */
#onlineOrderPopup .popup {
  width: 380px;
  max-width: 90%;
}

.url-container.hidden {
  display: none;
}

.status {
  display: none;
  margin-top: 10px;
  color: green;
  font-weight: bold;
}

/* Modern Toggle Row */
.modern-toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  gap: 12px;
}

/* Text block */
.toggle-text {
  display: flex;
  flex-direction: column;
}

.toggle-title {
  font-size: 17px;
  font-weight: 600;
  color: #333;
}

.toggle-subtitle {
  font-size: 13px;
  color: #777;
  margin-top: 2px;
}

/* Modern Switch */
.modern-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
}

.modern-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.modern-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0;
  right: 0; bottom: 0;
  background-color: #ccc;
  border-radius: 34px;
  transition: 0.3s;
}

.modern-slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.3s;
}

/* Checked state */
.modern-switch input:checked + .modern-slider {
  background-color: #28a745; /* green */
}

.modern-switch input:checked + .modern-slider:before {
  transform: translateX(24px);
}

/* Mobile touch area */
@media (max-width: 480px) {
  .modern-switch {
    width: 56px;
    height: 30px;
  }
  .modern-slider:before {
    height: 24px;
    width: 24px;
  }
}

/* Make the Online Ordering URL box wider and more readable */
#popupOnlineUrl {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  border-radius: 8px;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

/* Optional: make the container breathe more */
#popupUrlContainer {
  margin-top: 12px;
}

@media (max-width: 480px) {
  #popupOnlineUrl {
    font-size: 17px;
    padding: 14px 16px;
  }
}

