/*
  Fikri Food — Order Modal
  Palette: #0E1317 dark · #EC3D08 red · #FFB936 gold · #F4F1EA cream · #E8E4DC border
*/

/* ── Overlay ──────────────────────────────────────────────────── */
#fo-overlay {
  position: fixed; inset: 0;
  background: rgba(14,19,23,.65);
  z-index: 99999;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
  padding: 20px;
  backdrop-filter: blur(5px);
}
#fo-overlay.fo-open { opacity: 1; pointer-events: all; }

/* ── Modal ────────────────────────────────────────────────────── */
#fo-modal {
  position: relative;
  background: #fff;
  border-radius: 22px;
  width: 100%; max-width: 960px;
  max-height: 88vh;
  overflow: hidden;
  transform: translateY(24px) scale(.97);
  transition: transform .3s cubic-bezier(.22,1,.36,1);
  box-shadow: 0 32px 80px rgba(14,19,23,.22), 0 0 0 1px #E8E4DC;
}
#fo-overlay.fo-open #fo-modal { transform: none; }

/* ── Close ────────────────────────────────────────────────────── */
#fo-close {
  position: absolute; top: 14px; right: 14px;
  width: 30px; height: 30px;
  background: #F4F1EA; border: 1.5px solid #E8E4DC;
  border-radius: 7px; cursor: pointer; z-index: 20;
  display: flex; align-items: center; justify-content: center;
  font-size: 0;
  transition: background .15s, border-color .15s;
}
#fo-close::before, #fo-close::after {
  content: ""; position: absolute;
  width: 12px; height: 1.8px;
  background: #6B6B6B; border-radius: 2px;
}
#fo-close::before { transform: rotate(45deg); }
#fo-close::after  { transform: rotate(-45deg); }
#fo-close:hover { background: #EC3D08; border-color: #EC3D08; }
#fo-close:hover::before, #fo-close:hover::after { background: #fff; }

/* ── Grid ─────────────────────────────────────────────────────── */
#fo-modal-inner {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  height: 88vh; max-height: 88vh;
}

/* ── Scrollbars ───────────────────────────────────────────────── */
#fo-left::-webkit-scrollbar, #fo-right::-webkit-scrollbar { width: 3px; }
#fo-left::-webkit-scrollbar-track, #fo-right::-webkit-scrollbar-track { background: transparent; }
#fo-left::-webkit-scrollbar-thumb, #fo-right::-webkit-scrollbar-thumb { background: #E8E4DC; border-radius: 3px; }

/* ── LEFT ─────────────────────────────────────────────────────── */
#fo-left {
  padding: 24px 20px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 16px;
  background: #fff;
  border-right: 1px solid #F0EDE6;
}

/* ── Item header ──────────────────────────────────────────────── */
#fo-item-header { display: flex; gap: 14px; align-items: flex-start; }

#fo-item-img-wrap {
  flex-shrink: 0;
  width: 120px; height: 120px;
  border-radius: 16px; overflow: hidden;
  background: #F4F1EA; border: 1px solid #E8E4DC;
  box-shadow: 0 4px 14px rgba(14,19,23,.08);
}
#fo-item-img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform .4s;
}
#fo-item-img:hover { transform: scale(1.08); }

#fo-item-info { flex: 1; min-width: 0; }

#fo-item-cat {
  display: inline-block;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.2px;
  color: #EC3D08; background: rgba(236,61,8,.07);
  border-radius: 5px; padding: 3px 9px; margin-bottom: 6px;
}

#fo-item-name {
  font-size: 20px; font-weight: 800;
  color: #0E1317; margin: 0 0 4px; line-height: 1.2;
}
#fo-item-desc {
  font-size: 13px; color: #6B6B6B;
  margin: 0 0 12px; line-height: 1.5;
}

/* ── Price + qty row ──────────────────────────────────────────── */
#fo-item-price-line {
  display: flex; align-items: center;
  gap: 12px; margin-bottom: 10px;
  flex-wrap: nowrap;
}
#fo-unit-price { font-size: 24px; font-weight: 800; color: #EC3D08; }

/* Qty pill */
#fo-qty-wrap {
  display: flex; align-items: center;
  background: #F4F1EA; border: 1.5px solid #E8E4DC;
  border-radius: 999px; overflow: hidden;
}
.fo-qty-btn {
  background: none; border: none;
  color: #0E1317; font-size: 18px;
  width: 34px; height: 34px;
  cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: Arial, sans-serif;
  transition: background .12s, color .12s;
}
.fo-qty-btn:hover { background: #EC3D08; color: #fff; }
#fo-qty-val {
  min-width: 28px; text-align: center;
  font-size: 15px; font-weight: 700; color: #0E1317;
}

/* ── Pizza size selector ──────────────────────────────────────── */
#fo-size-wrap {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px; flex-wrap: wrap;
}
.fo-size-label {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px;
  color: #6B6B6B; white-space: nowrap;
}
.fo-size-btns { display: flex; gap: 6px; }
.fo-size-btn {
  background: #fff;
  border: 1.5px solid #E8E4DC;
  border-radius: 8px;
  color: #0E1317;
  font-size: 13px; font-weight: 600;
  padding: 8px 18px;
  cursor: pointer; font-family: inherit;
  white-space: nowrap;
  transition: border-color .15s, background .15s, color .15s, box-shadow .15s;
  line-height: 1.2;
}
.fo-size-btn:hover {
  border-color: #EC3D08;
  color: #EC3D08;
}
.fo-size-btn.fo-size-active {
  background: #EC3D08;
  border-color: #EC3D08;
  color: #fff;
  box-shadow: 0 3px 10px rgba(236,61,8,.25);
}

/* Add to cart button */
#fo-add-main {
  background: #EC3D08; border: none; color: #fff;
  font-size: 12px; font-weight: 700;
  padding: 0 16px; height: 34px;
  border-radius: 8px;
  cursor: pointer; font-family: inherit;
  transition: background .15s; white-space: nowrap;
  letter-spacing: .3px; flex-shrink: 0;
  display: flex; align-items: center;
}
#fo-add-main:hover { background: #c62d00; }

/* ── Cart section ─────────────────────────────────────────────── */
#fo-cart-section {
  background: #F9F8F6;
  border: 1px solid #F0EDE6;
  border-radius: 14px; padding: 14px;
}
#fo-cart-title {
  font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 1.2px;
  color: #0E1317; margin: 0 0 10px;
}

.fo-cart-line {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 0; border-bottom: 1px solid #F0EDE6;
}
.fo-cart-line:last-child { border-bottom: none; }

.fo-cl-thumb {
  width: 40px; height: 40px;
  border-radius: 8px; object-fit: cover; flex-shrink: 0;
  background: #fff; border: 1px solid #E8E4DC;
}
.fo-cl-name {
  flex: 1; font-size: 13px; font-weight: 600; color: #0E1317;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fo-cl-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

/* Qty pill — cart lines */
.fo-cl-qty {
  display: flex; align-items: center;
  background: #fff; border: 1px solid #E8E4DC;
  border-radius: 999px; overflow: hidden;
}
.fo-cl-btn {
  background: none; border: none; color: #0E1317;
  font-size: 14px; width: 24px; height: 24px;
  cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: Arial, sans-serif;
  transition: background .1s, color .1s;
}
.fo-cl-btn:hover { background: #EC3D08; color: #fff; }
.fo-cl-qty span {
  font-size: 12px; font-weight: 700; color: #0E1317;
  min-width: 18px; text-align: center;
}
.fo-cl-price {
  font-size: 13px; font-weight: 700; color: #EC3D08;
  min-width: 46px; text-align: right;
}
.fo-cl-remove {
  background: none; border: none;
  color: #C0BAB0; font-size: 16px;
  cursor: pointer; line-height: 1; padding: 0;
  transition: color .1s;
}
.fo-cl-remove:hover { color: #EC3D08; }

#fo-cart-total-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 10px; padding-top: 10px;
  border-top: 1.5px solid #E8E4DC;
  font-size: 13px; font-weight: 700; color: #0E1317;
}
#fo-cart-total { color: #EC3D08; font-size: 18px; }
.fo-empty-cart { font-size: 12px; color: #B0A898; padding: 4px 0; }

/* ── Upsell ───────────────────────────────────────────────────── */
#fo-upsell-section h4 {
  font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 1.2px;
  color: #0E1317; margin: 0 0 8px;
  display: flex; align-items: center; gap: 6px;
}
#fo-upsell-section h4::before {
  content: ""; width: 8px; height: 8px;
  background: #FFB936; border-radius: 50%;
  display: inline-block; flex-shrink: 0;
}

.fo-upsell-card {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid #F0EDE6;
  border-radius: 12px; padding: 8px 10px; margin-bottom: 7px;
  transition: border-color .15s, box-shadow .15s;
}
.fo-upsell-card:hover {
  border-color: #EC3D08;
  box-shadow: 0 2px 10px rgba(236,61,8,.08);
}
.fo-upsell-thumb {
  width: 48px; height: 48px;
  border-radius: 10px; object-fit: cover; flex-shrink: 0;
  background: #F4F1EA; border: 1px solid #E8E4DC;
}
.fo-upsell-info { flex: 1; min-width: 0; }
.fo-upsell-info strong {
  display: block; font-size: 13px; font-weight: 700; color: #0E1317;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3;
}
.fo-upsell-info small {
  font-size: 11px; color: #6B6B6B;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block;
}
.fo-upsell-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.fo-upsell-price { font-size: 13px; font-weight: 700; color: #EC3D08; }
.fo-upsell-add {
  background: #EC3D08; border: none; color: #fff;
  font-size: 11px; font-weight: 700;
  padding: 4px 10px; border-radius: 6px;
  cursor: pointer; font-family: inherit;
  transition: background .12s; white-space: nowrap;
}
.fo-upsell-add:hover { background: #B52E06; }

/* ── RIGHT panel ──────────────────────────────────────────────── */
#fo-right {
  padding: 24px 22px;
  overflow-y: auto;
  display: flex; flex-direction: column;
  background: #F9F8F6;
  border-left: 1px solid #F0EDE6;
}

#fo-form-title {
  font-size: 16px; font-weight: 800; color: #0E1317;
  margin: 0 0 16px; display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
#fo-form { display: flex; flex-direction: column; flex: 1; }

/* Fields */
.fo-field { margin-bottom: 12px; flex-shrink: 0; }
.fo-field label {
  display: block; font-size: 11px; font-weight: 700;
  color: #8A8078; text-transform: uppercase;
  letter-spacing: .5px; margin-bottom: 5px;
}
.fo-req { color: #EC3D08; }

.fo-field input, .fo-field textarea {
  width: 100%; background: #fff;
  border: 1.5px solid #E8E4DC; border-radius: 10px;
  color: #0E1317; font-size: 14px;
  padding: 10px 13px; outline: none;
  transition: border-color .15s, box-shadow .15s;
  box-sizing: border-box; font-family: inherit;
}
.fo-field input::placeholder, .fo-field textarea::placeholder { color: #C8C0B6; }
.fo-field input:focus, .fo-field textarea:focus {
  border-color: #EC3D08;
  box-shadow: 0 0 0 3px rgba(236,61,8,.09);
}
.fo-field input.fo-invalid, .fo-field textarea.fo-invalid { border-color: #e53935; }
.fo-err { display: block; font-size: 11px; color: #e53935; margin-top: 3px; min-height: 13px; }

.fo-phone-wrap {
  display: flex; align-items: center;
  background: #fff; border: 1.5px solid #E8E4DC;
  border-radius: 10px; overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}
.fo-phone-wrap:focus-within {
  border-color: #EC3D08;
  box-shadow: 0 0 0 3px rgba(236,61,8,.09);
}
.fo-flag {
  padding: 10px 12px; font-size: 14px; color: #6B6B6B;
  border-right: 1.5px solid #E8E4DC; flex-shrink: 0; white-space: nowrap;
}
.fo-phone-wrap input { border: none !important; border-radius: 0 !important; background: transparent !important; flex: 1; box-shadow: none !important; }
.fo-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Payment hidden */
.fo-pay-opts, .fo-pay-opt { display: none; }

/* Summary */
#fo-summary-box {
  background: #fff; border: 1px solid #F0EDE6;
  border-radius: 12px; padding: 12px 14px;
  margin: 10px 0; flex-shrink: 0;
}
.fo-sum-line {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 0; border-bottom: 1px solid #F4F1EA;
}
.fo-sum-line:last-child { border-bottom: none; }
.fo-sum-thumb {
  width: 30px; height: 30px; border-radius: 6px; object-fit: cover;
  flex-shrink: 0; background: #F4F1EA; border: 1px solid #E8E4DC;
}
.fo-sum-name { flex: 1; font-size: 12px; color: #0E1317; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fo-sum-price { font-size: 12px; font-weight: 700; color: #EC3D08; flex-shrink: 0; }

#fo-summary-total-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 8px; padding-top: 8px;
  border-top: 1.5px solid #F0EDE6;
  font-size: 13px; color: #0E1317;
}
#fo-summary-total { color: #EC3D08; font-size: 17px; font-weight: 800; }

/* Submit */
#fo-submit {
  width: 100%; flex-shrink: 0; margin-top: auto;
  background: linear-gradient(135deg, #EC3D08 0%, #B52E06 100%);
  border: none; border-radius: 12px; color: #fff;
  font-size: 15px; font-weight: 700; padding: 14px;
  cursor: pointer; font-family: inherit;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: opacity .2s, transform .15s;
  box-shadow: 0 4px 18px rgba(236,61,8,.28);
  letter-spacing: .2px;
}
#fo-submit:hover { opacity: .91; transform: translateY(-1px); }
#fo-submit:active { transform: none; }
#fo-submit:disabled { opacity: .4; cursor: not-allowed; transform: none; }

/* ── Success ──────────────────────────────────────────────────── */
#fo-success {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 30px 20px;
}
#fo-success-icon {
  width: 68px; height: 68px;
  background: linear-gradient(135deg, #EC3D08, #B52E06);
  border-radius: 50%; font-size: 30px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; margin-bottom: 16px;
  box-shadow: 0 4px 22px rgba(236,61,8,.28);
  animation: fo-pop .4s cubic-bezier(.22,1,.36,1);
}
@keyframes fo-pop { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
#fo-success h3 { font-size: 20px; font-weight: 800; color: #0E1317; margin: 0 0 8px; }
#fo-success p  { font-size: 13px; color: #6B6B6B; line-height: 1.6; margin: 0; }

#fo-whatsapp-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: #25d366; color: #fff; border-radius: 10px;
  padding: 11px 22px; font-size: 14px; font-weight: 700;
  text-decoration: none; margin-top: 18px;
  transition: opacity .15s; font-family: inherit;
}
#fo-whatsapp-btn:hover { opacity: .88; }
#fo-new-order {
  margin-top: 8px; background: none;
  border: 1.5px solid #E8E4DC; color: #8A8078;
  border-radius: 10px; padding: 9px 20px;
  font-size: 13px; cursor: pointer; font-family: inherit;
  transition: border-color .15s, color .15s;
}
#fo-new-order:hover { border-color: #EC3D08; color: #0E1317; }

/* ── Menu item cursor ─────────────────────────────────────────── */
.list--item.pxl-transtion { cursor: pointer !important; }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 700px) {
  #fo-modal-inner { grid-template-columns: 1fr; height: auto; max-height: 94vh; }
  #fo-left { border-right: none; border-bottom: 1px solid #F0EDE6; max-height: 55vh; }
  #fo-right { border-left: none; border-top: 1px solid #F0EDE6; }
  #fo-modal { border-radius: 18px 18px 0 0; max-height: 94vh; }
  #fo-overlay { align-items: flex-end; padding: 0; }
  .fo-row2 { grid-template-columns: 1fr; gap: 0; }
  #fo-item-img-wrap { width: 90px; height: 90px; }
}
@media (max-width: 400px) {
  #fo-left, #fo-right { padding: 16px 13px; }
  #fo-item-name { font-size: 17px; }
  .fo-size-btn { padding: 7px 12px; font-size: 12px; }
}
