/* Etlon Coffee kiosk — Muller (same as E-CRM client Designs/MullerRegular.otf) */
@font-face {
  font-family: "Muller";
  src: url("/fonts/MullerRegular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

html {
  font-size: 120%;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  font-family: "Muller", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, #fff5f0 0, transparent 32%),
    radial-gradient(circle at bottom right, #ffe8d9 0, transparent 32%),
    linear-gradient(180deg, #fbfbfb 0%, #f2f0ef 100%);
  min-height: 100vh;
}

h1, h2, h3, h4 { font-weight: 700; }
a, .btn-link { color: var(--accent); }
/* .btn-* — см. css/akno-buttons.css */
.form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(229, 103, 42, 0.25);
}
.valid.modified:not([type=checkbox]) { outline: 1px solid #26b050; }
.invalid { outline: 1px solid #e50000; }
.validation-message { color: #e50000; }

.blazor-error-boundary {
  background: #b32121;
  padding: 1rem 1rem 1rem 3.7rem;
  color: white;
}
.blazor-error-boundary::after { content: "Произошла ошибка."; }

/* Order layout */
.order-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.order-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  background: var(--accent-gradient);
  color: #fff;
  padding: 1rem 24px;
  font-size: 28.8px;
  font-weight: 800;
}

.order-header-title {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
}

.order-main {
  flex: 1;
  padding: 20px 28px;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

/* Catalog — single-page: categories left, products center, cart fixed bottom */
.catalog-page {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 120px);
  min-height: 0;
  margin: 0 -4px;
}

.menu-content-row {
  display: flex;
  flex: 1;
  min-height: 0;
  gap: 20px;
}

/* Category list — categories left, products right */
.category-list {
  display: flex;
  flex: 1;
  min-height: 0;
  min-width: 0;
  gap: 20px;
}

.category-list > p {
  padding: 24px;
}

/* Categories — LEFT panel, own scroll */
.categories-panel {
  width: 220px;
  flex-shrink: 0;
  background: var(--panel);
  backdrop-filter: blur(18px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.55);
  box-shadow: var(--shadow);
  padding: 16px 12px;
  overflow-y: auto;
  overflow-x: hidden;
}

.categories-panel h3 {
  margin: 0 0 12px 8px;
  font-size: 18px;
  color: var(--muted);
}

.category-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  margin-bottom: 8px;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  background: var(--panel-strong);
  font-weight: 700;
  font-size: 18px;
  cursor: pointer;
  transition: 0.2s ease;
  color: var(--text);
  min-height: 48px;
  box-sizing: border-box;
}

.category-item:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(229, 103, 42, 0.12);
}

.category-item.active {
  background: var(--accent-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(229, 103, 42, 0.2);
}

/* Products — center, scroll only inside cards area */
.products-panel {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px 24px;
  background: var(--panel);
  backdrop-filter: blur(18px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.55);
  box-shadow: var(--shadow);
}

/* Cart bar — FIXED at bottom */
.cart-bar,
.cart-bar-fixed {
  flex-shrink: 0;
  background: var(--panel-strong);
  backdrop-filter: blur(18px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.55);
  box-shadow: 0 -4px 20px rgba(77, 53, 37, 0.08);
  padding: 16px 24px;
  margin-top: 16px;
}

.cart-bar .cart-summary,
.cart-bar-fixed .cart-summary { padding: 0; }
.cart-bar .cart-summary h3,
.cart-bar-fixed .cart-summary h3 { margin: 0 0 12px; font-size: 24px; }
.cart-bar .cart-item-list,
.cart-bar-fixed .cart-item-list { max-height: 140px; overflow-y: auto; }

.cart-bar .cart-item-price,
.cart-bar-fixed .cart-item-price {
  margin-right: 10px;
}

/* Panels */
.panel {
  background: var(--panel);
  backdrop-filter: blur(18px);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255,255,255,0.55);
  box-shadow: var(--shadow);
}

.cart-area {
  background: var(--panel);
  backdrop-filter: blur(18px);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255,255,255,0.55);
  box-shadow: var(--shadow);
  padding: 24px;
  height: fit-content;
  position: sticky;
  top: 20px;
}

/* Product grid — bigger cards, more margins */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  padding: 4px 0;
}

.product-card {
  background: var(--panel-strong);
  border: 2px solid transparent;
  border-radius: 22px;
  padding: 0;
  min-height: 200px;
  cursor: pointer;
  transition: 0.2s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.product-card:hover {
  border-color: var(--accent);
  box-shadow: 0 12px 26px rgba(229, 103, 42, 0.14);
}

.product-card-image {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--image-placeholder);
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-card-placeholder,
.product-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--image-placeholder);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 57.6px;
}

.product-card-body {
  padding: 16px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.product-card h4 { margin: 0 0 8px; font-size: 21.6px; line-height: 1.3; }
.product-card .price { font-weight: 800; font-size: 24px; color: var(--accent); margin: 0; }
.product-card .desc { margin: 4px 0 0; color: var(--muted); font-size: 15.6px; line-height: 1.4; }

.catalog-area h2 { margin: 0 0 16px; font-size: 31.2px; }

/* Cart summary */
.cart-summary h3, .checkout-summary h3 {
  margin: 0 0 18px;
  font-size: 31.2px;
}

.cart-total, .checkout-total {
  margin: 16px 0;
  font-size: 24px;
  font-weight: 800;
}

.cart-empty { color: var(--muted); }

.cart-item-list { margin: 0 0 12px; }

.cart-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(229, 103, 42, 0.08);
}

.cart-item:last-child { border-bottom: 0; }

.cart-item-name { font-weight: 600; }
.cart-item-mods { color: var(--muted); font-size: 15.6px; }
.cart-item-price { font-weight: 800; }
.qty-controls { display: flex; align-items: center; gap: 8px; }
.qty-controls button {
  min-width: 48px;
  min-height: 48px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--panel-strong);
  cursor: pointer;
  font-weight: 700;
  font-size: 21.6px;
}
.qty-controls button:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-remove {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 24px;
}

.btn-block { width: 100%; }

/* Pay button */
.pay-btn {
  width: 100%;
  border: 0;
  border-radius: var(--btn-radius);
  min-height: var(--btn-height-lg);
  background: linear-gradient(135deg, var(--success), #215e43);
  color: #fff;
  padding: 16px 20px;
  font-size: 24px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 16px 34px rgba(47, 125, 91, 0.22);
}

/* Cart float */
.cart-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--accent-gradient);
  color: #fff;
  padding: 14px 24px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: var(--shadow);
  font-weight: 700;
}

.cart-float:hover { opacity: 0.95; }
.cart-float-count { margin-right: 6px; }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: var(--panel-strong);
  border-radius: var(--radius-xl);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 { margin: 0; font-size: 28.8px; }

.btn-close {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 28.8px;
  cursor: pointer;
  padding: 4px 12px;
  line-height: 1;
}

.modal-body { padding: 20px 24px; }
.modal-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
}

/* Add-ons by category */
.addons-section { margin: 20px 0; }
.addons-section h4 { margin: 0 0 16px; font-size: 21.6px; font-weight: 700; color: var(--text); }

.modifier-groups-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.btn-collapse-all {
  min-height: var(--btn-height-md);
  padding: 0 18px;
  font-size: 15.6px;
  font-weight: 600;
  border-radius: var(--btn-radius);
  border: 2px solid var(--border);
  background: var(--panel-strong);
  color: var(--muted);
  cursor: pointer;
  transition: 0.2s ease;
}
.btn-collapse-all:hover {
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(229, 103, 42, 0.12);
}
.btn-collapse-all:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.modifier-group {
  margin: 0 0 12px 0;
  background: var(--panel);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}
.modifier-group:hover {
  box-shadow: 0 4px 16px rgba(61, 51, 50, 0.08);
}
.modifier-group.collapsed .modifier-options { display: none; }

.modifier-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 14px 18px;
  margin: 0;
  background: var(--panel-strong);
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  text-align: left;
  transition: background 0.2s ease;
}
.modifier-group-header:hover {
  background: rgba(229, 103, 42, 0.06);
}
.modifier-group-header:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.modifier-group.collapsed .modifier-group-header {
  border-radius: var(--radius-md);
}
.modifier-group:not(.collapsed) .modifier-group-header {
  border-bottom: 1px solid var(--border);
}

.modifier-group-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  font-size: 13.2px;
  color: var(--accent);
  background: rgba(229, 103, 42, 0.1);
  border-radius: 6px;
  transition: transform 0.2s ease, background 0.2s ease;
}
.modifier-group-header:hover .modifier-group-chevron {
  background: rgba(229, 103, 42, 0.18);
}
.modifier-group:not(.collapsed) .modifier-group-chevron {
  transform: rotate(90deg);
}

.modifier-group-label {
  flex: 1;
  font-weight: 700;
  font-size: 18px;
  color: var(--accent);
}

.modifier-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 18px;
}

.modifier-option {
  position: relative;
  background: var(--panel-strong);
  border: 2px solid var(--border);
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 600;
  font-size: 16.8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: 0.2s ease;
}
.modifier-option:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(229, 103, 42, 0.1);
}
.modifier-option input {
  margin: 0;
  accent-color: var(--accent);
  width: 1.1em;
  height: 1.1em;
}
.modifier-option.selected,
.modifier-option:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 2px 8px rgba(229, 103, 42, 0.2);
}
.modifier-option .modifier-option-price {
  font-size: 15.6px;
  font-weight: 600;
  color: var(--muted);
}
.modifier-option.selected .modifier-option-price,
.modifier-option:has(input:checked) .modifier-option-price {
  color: rgba(255, 255, 255, 0.9);
}

/* Size selection */
.size-row { margin: 18px 0; }
.size-row label { display: block; margin-bottom: 10px; font-weight: 600; }
.size-options { display: flex; flex-wrap: wrap; gap: 10px; }
.size-option {
  padding: 12px 18px;
  border-radius: var(--radius-md);
  border: 2px solid var(--border);
  background: var(--panel-strong);
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
}
.size-option:hover { border-color: var(--accent); }
.size-option.active {
  background: var(--accent-gradient);
  color: #fff;
  border-color: transparent;
}

.quantity-row .qty-value { min-width: 2rem; text-align: center; font-weight: 700; }
.cart-item-size { color: var(--muted); font-weight: 500; }

/* Kiosk problems page — full-screen lock */
.kiosk-problems {
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, #1a1810 0%, #3d3332 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  color: #fff;
}
.kiosk-problems-content {
  text-align: center;
  max-width: 480px;
  padding: 40px;
}
.kiosk-problems-icon {
  font-size: 76.8px;
  margin-bottom: 20px;
  opacity: 0.9;
}
.kiosk-problems h1 {
  font-size: 28.8px;
  margin: 0 0 12px;
}
.kiosk-problems p {
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 24px;
}
.kiosk-problems-list {
  text-align: left;
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius);
  padding: 16px 24px;
}
.kiosk-problems-list li {
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.kiosk-problems-list li:last-child { border-bottom: none; }
.kiosk-problems-retry {
  margin-top: 8px;
}

.upsell-panel { margin: 18px 0; }
.upsell-panel h4 { margin: 0 0 10px; font-size: 21.6px; }
.upsell-option {
  display: block;
  padding: 8px 0;
  cursor: pointer;
}

.quantity-row { margin: 18px 0; }
.quantity-row label { margin-right: 8px; font-weight: 600; }
.quantity-row input { width: 4rem; padding: 8px; border-radius: var(--radius); border: 1px solid var(--border); }

/* Checkout */
.checkout-page, .payment-page {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  max-width: 1480px;
  margin: 0 auto;
}

.checkout-actions {
  display: flex;
  gap: 16px;
  margin-top: 24px;
}

.payment-amount { font-size: 24px; margin: 16px 0; }

.payment-progress {
  text-align: center;
  padding: 48px;
}

.payment-progress p { font-size: 21.6px; color: var(--muted); }
.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.mock-payment-form .text-muted { color: var(--muted); margin-bottom: 16px; }

.confirmation-page {
  margin: 0 auto;
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.order-number-screen {
  width: 100%;
  padding: 24px 16px;
}

.order-number-screen__hint {
  margin: 0 0 12px;
  font-size: clamp(24px, 4vw, 38.4px);
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.order-number-screen__value {
  margin: 0;
  font-size: clamp(57.6px, 14vw, 144px);
  font-weight: 800;
  line-height: 1.05;
  color: var(--text);
  letter-spacing: -0.02em;
  word-break: break-word;
}

.order-confirmation-fallback {
  padding: 24px;
}

.order-confirmation-fallback p {
  margin-bottom: 16px;
  font-size: 21.6px;
  color: var(--muted);
}

/* Print */
@media print {
  .order-header, .cart-float, nav, .blazor-error-boundary { display: none !important; }
  .order-main { padding: 0; }
}

@media (max-width: 1100px) {
  .catalog-page { grid-template-columns: 1fr; }
  .checkout-page, .payment-page { grid-template-columns: 1fr; }
}
