/*
  QRToolHub.com - QR Menu Builder Ultra-Modern Luxury Styles
*/

/* =========================================
   LAYOUT & CONTAINER
   ========================================= */
.tool-page-container {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 32px;
  margin-top: 24px;
  margin-bottom: 60px;
  align-items: start;
}

@media (max-width: 1100px) {
  .tool-page-container {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* =========================================
   LEFT PANEL - EDITOR
   ========================================= */
.settings-panel {
  background: var(--container-bg);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.settings-panel:hover {
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.08);
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-color);
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.panel-title i {
  color: var(--primary-color);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12) 0%, rgba(59, 130, 246, 0.2) 100%);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

.panel-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 24px;
  margin-top: 4px;
  line-height: 1.5;
}

/* Section Divider */
.builder-section {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 24px;
}

.builder-section:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.builder-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.builder-section-title {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* =========================================
   FORM INPUTS & CONTROLS
   ========================================= */
.form-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 14px;
}

@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field label,
.settings-panel label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

.settings-panel input[type="text"],
.settings-panel input[type="number"],
.settings-panel select,
.form-input {
  width: 100%;
  padding: 11px 16px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: var(--bg-color);
  color: var(--text-color);
  font-size: 0.88rem;
  outline: none;
  font-family: var(--font-body);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.settings-panel input[type="text"]:hover,
.settings-panel select:hover {
  border-color: rgba(37, 99, 235, 0.4);
}

.settings-panel input[type="text"]:focus,
.settings-panel select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
  background: var(--container-bg);
}

.settings-panel input[type="color"] {
  width: 100%;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: var(--bg-color);
  padding: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.settings-panel input[type="color"]:hover {
  border-color: var(--primary-color);
  transform: scale(1.02);
}

/* =========================================
   CATEGORY + ITEM CARDS IN FORM
   ========================================= */
#categories-container {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.category-block {
  border: 1px solid var(--border-color);
  border-radius: 18px;
  overflow: hidden;
  background: var(--bg-color);
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.category-block:hover {
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.06);
}

.category-block-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--container-bg);
  border-bottom: 1px solid var(--border-color);
}

.category-block-header input {
  flex: 1;
  border: none;
  background: transparent;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text-color);
  outline: none;
  font-family: var(--font-body);
}

.cat-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.cat-actions button {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--container-bg);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.cat-actions button:hover {
  border-color: #ef4444;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
  transform: translateY(-1px);
}

.cat-actions button.move-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: rgba(37, 99, 235, 0.08);
}

.category-items-list {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg-color);
}

.item-card {
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 16px;
  background: var(--container-bg);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.item-card:hover {
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.08);
  border-color: rgba(37, 99, 235, 0.25);
}

.item-card-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 4px;
}

.item-card-actions button {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-color);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.68rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.item-card-actions button:hover {
  border-color: #ef4444;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}

.item-card-actions button.move-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: rgba(37, 99, 235, 0.08);
}

.item-image-btn {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  border: 2px dashed var(--border-color);
  background: var(--bg-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1.1rem;
  overflow: hidden;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.item-image-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: rgba(37, 99, 235, 0.05);
  transform: scale(1.04);
}

.item-image-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.add-item-btn {
  width: 100%;
  border: 2px dashed var(--border-color);
  background: transparent;
  border-radius: 14px;
  padding: 11px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.add-item-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.04) 0%, rgba(59, 130, 246, 0.08) 100%);
  transform: translateY(-1px);
}

/* =========================================
   ACTION BUTTONS (SAVE / RESET)
   ========================================= */
.builder-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}

.btn-save {
  flex: 1;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 14px 24px;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-body);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 24px -4px rgba(37, 99, 235, 0.35);
}

.btn-save:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -4px rgba(37, 99, 235, 0.45);
  filter: brightness(1.08);
}

.btn-save:active {
  transform: translateY(0);
}

.btn-reset {
  border: 1px solid var(--border-color);
  background: var(--bg-color);
  color: var(--text-secondary);
  border-radius: 14px;
  padding: 14px 20px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  transition: all 0.2s ease;
}

.btn-reset:hover {
  border-color: #ef4444;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.06);
  transform: translateY(-1px);
}

.btn-add-cat {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 9px 16px;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-body);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
  transition: all 0.2s ease;
}

.btn-add-cat:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
}

/* =========================================
   RIGHT PANEL - PREVIEW (MOBILE MOCKUP)
   ========================================= */
.preview-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 90px;
}

.preview-card {
  background: var(--container-bg);
  border: 1px solid var(--border-color);
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
}

.preview-card h2 {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 20px;
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.01em;
}

.preview-card h2 i {
  color: var(--primary-color);
}

/* Realistic Phone Frame */
.phone-frame {
  width: 275px;
  height: 535px;
  border-radius: 42px;
  border: 10px solid #0f172a;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #070b14 0%, #0f172a 100%);
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  margin: 0 auto;
  position: relative;
  flex-shrink: 0;
}

/* Dynamic Island Notch */
.phone-frame::before {
  content: '';
  position: absolute;
  top: 7px;
  left: 50%;
  transform: translateX(-50%);
  width: 78px;
  height: 18px;
  background: #000;
  border-radius: 20px;
  z-index: 30;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.phone-statusbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px 4px;
  font-size: 9px;
  font-weight: 600;
  color: #94a3b8;
  background: rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
  z-index: 10;
}

.phone-statusbar-icons {
  display: flex;
  gap: 6px;
  align-items: center;
}

.phone-appbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}

.phone-appbar-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #f1f5f9;
}

.phone-appbar i {
  font-size: 11px;
  color: #64748b;
}

.phone-viewport {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: none;
}

.phone-viewport::-webkit-scrollbar { display: none; }

.phone-catbar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  scrollbar-width: none;
  flex-shrink: 0;
}

.phone-catbar::-webkit-scrollbar { display: none; }

/* Category Pills in Mobile Viewport */
.category-pill-active {
  padding: 6px 14px;
  font-size: 9.5px;
  font-weight: 800;
  border-radius: 999px;
  white-space: nowrap;
  cursor: pointer;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
  transition: all 0.2s ease;
}

.category-pill-inactive {
  padding: 6px 14px;
  font-size: 9.5px;
  font-weight: 700;
  border-radius: 999px;
  white-space: nowrap;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.2s ease;
}

.category-pill-inactive:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
}

/* Premium Mobile Menu Cards */
.premium-menu-card {
  transition: transform 0.2s ease;
}

.premium-menu-card:hover {
  transform: translateY(-2px);
}

/* QR Code Card */
.qr-widget {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.qr-box {
  display: flex;
  justify-content: center;
}

.qr-inner {
  padding: 16px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.share-link-row {
  display: flex;
  gap: 8px;
}

.share-link-input {
  flex: 1;
  padding: 10px 14px;
  font-size: 0.78rem;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-color);
  color: var(--text-color);
  outline: none;
  cursor: pointer;
  font-family: var(--font-body);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-copy {
  padding: 10px 16px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-copy:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

.btn-download-qr {
  width: 100%;
  background: #0f172a;
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 12px;
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--font-body);
  transition: all 0.2s ease;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.3);
}

.btn-download-qr:hover {
  background: #1e293b;
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(15, 23, 42, 0.4);
}

/* =========================================
   CUSTOMER VIEW (FULLSCREEN SCAN VIEW)
   ========================================= */
#customer-view-container {
  padding: 0;
}

.customer-phone-wrap {
  max-width: 440px;
  margin: 30px auto;
  border-radius: 36px;
  overflow: hidden;
  background: linear-gradient(180deg, #070b14 0%, #0f172a 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  min-height: 85vh;
  font-family: var(--font-body);
}

/* =========================================
   SEO & MISC UTILITIES
   ========================================= */
.hidden-real { display: none !important; }
.hidden { display: none !important; }

/* Animate fade in */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in { animation: fadeIn 0.3s ease forwards; }
