/* =========================
   KH Kiosk - Checkout Only
========================= */

#checkoutModal{
  position:fixed;
  inset:0;
  z-index:999999;
}

.checkoutModalBox{
  width:min(1100px,95vw);
  max-height:92vh;
  overflow-y:auto;
  background:#ffffff;
  border-radius:24px;
  padding:32px;
  position:relative;
  box-shadow:0 25px 70px rgba(0,0,0,.35);
}

.closeCheckoutModal{
  position:absolute;
  top:14px;
  right:16px;
  border:none;
  background:#f3f4f6;
  width:38px;
  height:38px;
  border-radius:50%;
  font-size:26px;
  cursor:pointer;
}

.checkoutBadge{
  display:inline-block;
  background:#e7f0ff;
  color:#0b66d8;
  padding:8px 16px;
  border-radius:999px;
  font-weight:bold;
  font-size:12px;
  margin-bottom:14px;
}

.checkoutText{
  color:#666;
  margin:12px 0 24px;
  line-height:1.6;
}

.modernCheckoutGrid{
  display:grid;
  grid-template-columns:2fr 1fr;
  gap:28px;
}

.checkoutFormArea{
  display:flex;
  flex-direction:column;
  gap:18px;
}

.formSection{
  background:#f8fafc;
  border:1px solid #e5e7eb;
  border-radius:18px;
  padding:20px;
}

.formSection h3{ margin-bottom:14px; }

.formSection input,
.formSection textarea{
  width:100%;
  margin-bottom:12px;
  padding:14px;
  border:1px solid #ddd;
  border-radius:12px;
  font-size:15px;
}

.formSection textarea{
  min-height:90px;
  resize:vertical;
}

.paymentChoices{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:12px;
}

.paymentChoices button{
  background:#fff;
  border:1px solid #d9d9d9;
  border-radius:14px;
  padding:15px;
  cursor:pointer;
  font-weight:600;
  transition:.2s;
}

.paymentChoices button:hover{
  background:#0b66d8;
  color:#fff;
}

.orderSummary{
  background:#0b1f4d;
  color:#fff;
  border-radius:20px;
  padding:22px;
  height:fit-content;
}

.summaryLine,
.summaryTotal{
  display:flex;
  justify-content:space-between;
  padding:12px 0;
  border-bottom:1px solid rgba(255,255,255,.15);
}

.summaryTotal{
  border-bottom:none;
  font-size:20px;
  font-weight:bold;
}

.rewardBox{
  background:rgba(255,255,255,.12);
  padding:14px;
  border-radius:14px;
  margin:20px 0;
}

.placeOrderBtn{
  width:100%;
  background:#fff;
  color:#0b1f4d;
  border:none;
  border-radius:999px;
  padding:16px;
  font-weight:bold;
  cursor:pointer;
}

.providerGrid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(140px, 1fr));
  gap:14px;
  margin-top:22px;
}

.providerGrid button{
  background:#f7f9fc;
  border:1px solid #e1e7f0;
  border-radius:18px;
  padding:18px 12px;
  cursor:pointer;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  min-height:155px;
}

.providerGrid img{
  width:64px;
  height:64px;
  object-fit:contain;
  margin-bottom:10px;
}

.providerGrid span{
  font-weight:800;
  color:#111;
}

.providerGrid small{
  margin-top:6px;
  font-size:11px;
  color:#666;
  line-height:1.3;
}

@media(max-width:900px){
  .modernCheckoutGrid,
  .paymentChoices{
    grid-template-columns:1fr;
  }

  .checkoutModalBox{
    width:95%;
    padding:20px;
  }
}
.cartItemInfo{
  flex:1;
}

.cartControls{
  display:flex;
  gap:8px;
  margin-top:10px;
  flex-wrap:wrap;
}

.cartControls button{
  border:none;
  background:#2d8c3f;
  color:white;
  width:34px;
  height:34px;
  border-radius:10px;
  font-weight:bold;
  cursor:pointer;
}

.cartControls .removeItemBtn{
  width:auto;
  padding:0 12px;
  background:#ef3157;
}

@media(max-width:600px){
  #checkoutModal .modalBtnRow{
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:12px !important;
  }

  #checkoutModal .modalBtnRow button{
    height:56px !important;
    font-size:16px !important;
    padding:12px !important;
    border-radius:14px !important;
  }

  .cartItem{
    align-items:flex-start;
  }

  .cartItem img{
    width:64px;
    height:64px;
  }
}/* =========================
   CART + CHECKOUT VISUAL FIX
========================= */

.cartBox{
  max-width:620px;
}

.cartItem{
  position:relative;
  display:flex;
  align-items:center;
  gap:18px;
  padding:18px 52px 18px 0;
}

.cartItem img{
  width:95px !important;
  height:95px !important;
  object-fit:contain !important;
  border-radius:18px;
  flex-shrink:0;
}

.cartInfo{
  flex:1;
  min-width:0;
  text-align:left;
}

.cartInfo h4{
  font-size:18px;
  line-height:1.25;
  margin-bottom:6px;
  white-space:normal;
}

.cartInfo p{
  font-size:14px;
  line-height:1.4;
  color:#666;
}

.deleteCartItem{
  position:absolute;
  top:14px;
  right:8px;
  width:46px !important;
  height:46px !important;
  border:none;
  border-radius:50%;
  background:#ef3157;
  color:#fff;
  font-size:21px;
  cursor:pointer;
}

.qtyControls{
  display:flex;
  align-items:center;
  gap:14px;
  margin-top:14px;
}

.qtyControls button{
  width:44px !important;
  height:44px !important;
  border:none;
  border-radius:12px;
  background:#2d8c3f;
  color:white;
  font-size:24px;
  font-weight:900;
  cursor:pointer;
}

.qtyControls span{
  min-width:34px;
  text-align:center;
  font-size:22px;
  font-weight:900;
}

/* Provider buttons previous look */

.providerGrid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(150px, 1fr));
  gap:16px;
  margin-top:24px;
}

.providerGrid button{
  min-height:180px;
  padding:20px 14px;
  border-radius:20px;
  border:1px solid #e1e7f0;
  background:#f7f9fc;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  cursor:pointer;
}

.providerGrid img{
  width:90px !important;
  height:90px !important;
  object-fit:contain !important;
  margin-bottom:12px;
}

.providerGrid span{
  font-size:16px;
  font-weight:900;
  color:#111;
  line-height:1.25;
  white-space:normal;
}

.providerGrid small{
  display:block;
  margin-top:7px;
  font-size:12px;
  line-height:1.35;
  color:#666;
  white-space:normal;
}

/* Keep delivery 3 across when enough room */

@media(min-width:700px){
  .providerGrid{
    grid-template-columns:repeat(3, 1fr);
  }
}

/* Pickup has 2 options */

@media(min-width:700px){
  .providerGrid:has(button:nth-child(2):last-child){
    grid-template-columns:repeat(2, 1fr);
  }
}

@media(max-width:600px){
  .cartItem{
    gap:14px;
    padding:16px 48px 16px 0;
  }

  .cartItem img{
    width:82px !important;
    height:82px !important;
  }

  .deleteCartItem{
    width:42px !important;
    height:42px !important;
    font-size:19px;
  }

  .qtyControls button{
    width:42px !important;
    height:42px !important;
  }

  .providerGrid{
    grid-template-columns:1fr 1fr;
  }

  .providerGrid button{
    min-height:165px;
  }

  .providerGrid img{
    width:78px !important;
    height:78px !important;
  }
}/* MOBILE CHECKOUT FIX */

@media(max-width:600px){

  .foodModalOverlay{
    align-items:flex-start !important;
    padding:14px !important;
    overflow-y:auto !important;
  }

  .foodModalBox,
  .checkoutModalBox{
    margin-top:18px !important;
    width:100% !important;
    max-height:none !important;
    padding:20px !important;
    border-radius:22px !important;
  }

  .foodModalBox h2,
  .checkoutModalBox h2{
    font-size:24px !important;
    line-height:1.2 !important;
    margin-top:16px !important;
  }

  .checkoutText{
    font-size:14px !important;
    line-height:1.45 !important;
    margin-bottom:18px !important;
  }

  .providerGrid{
    grid-template-columns:repeat(2,1fr) !important;
    gap:12px !important;
  }

  .providerGrid button{
    min-height:135px !important;
    padding:14px 8px !important;
  }

  .providerGrid img{
    width:58px !important;
    height:58px !important;
    margin-bottom:8px !important;
  }

  .providerGrid span{
    font-size:13px !important;
    line-height:1.2 !important;
  }

  .providerGrid small{
    font-size:10px !important;
    line-height:1.2 !important;
  }

  .modernCheckoutGrid{
    grid-template-columns:1fr !important;
    gap:16px !important;
  }

  .formSection{
    padding:15px !important;
  }

  .formSection input,
  .formSection textarea{
    padding:12px !important;
    font-size:14px !important;
  }

  .orderSummary{
    padding:18px !important;
  }

  .paymentChoices{
    grid-template-columns:1fr !important;
  }
}/* FORCE PROVIDER BUTTONS SIDE BY SIDE */

.providerGrid{
  display:grid !important;
  grid-template-columns:repeat(3, 1fr) !important;
  gap:14px !important;
}

.providerGrid button{
  width:100% !important;
  min-width:0 !important;
}

.providerGrid img{
  width:70px !important;
  height:70px !important;
  object-fit:contain !important;
}

/* Mobile: delivery stays 3 across, pickup stays 2 across */
@media(max-width:600px){
  .providerGrid{
    grid-template-columns:repeat(3, 1fr) !important;
  }

  .providerGrid button{
    min-height:130px !important;
    padding:12px 6px !important;
  }

  .providerGrid img{
    width:48px !important;
    height:48px !important;
  }

  .providerGrid span{
    font-size:11px !important;
    line-height:1.15 !important;
  }

  .providerGrid small{
    font-size:9px !important;
    line-height:1.15 !important;
  }
}/* =========================
   FOOD MODAL MOBILE BUTTON FIX
========================= */

@media (max-width:768px){

  .modalBtnRow{
    display:flex !important;
    flex-direction:column !important;
    gap:12px !important;
    width:100% !important;
  }

  .modalBtnRow .greenBtn,
  .modalBtnRow .outlineBtn,
  .modalBtnRow .redBtn{
    width:100% !important;
    min-width:100% !important;
    height:58px !important;
    padding:0 20px !important;
    border-radius:14px !important;
    font-size:16px !important;
    font-weight:800 !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    white-space:nowrap !important;
  }

}
#squarePaymentArea {
  display: block;
  width: 100%;
  margin-top: 12px;
}

#square-card-container {
  display: block;
  width: 100%;
  min-height: 90px;
  padding: 10px;
  margin-top: 8px;
  background: #ffffff;
  border: 1px solid #d7dce3;
  border-radius: 8px;
  box-sizing: border-box;
  overflow: visible;
}

#square-card-container iframe {
  display: block !important;
  width: 100% !important;
  min-height: 70px !important;
  border: 0 !important;
}

.squarePaymentStatus {
  display: block;
  margin-top: 8px;
  font-size: 12px;
}
/* Make checkout wider */

.checkoutModalContent,
.checkoutBox,
.foodModalBox{
  width:94vw;
  max-width:520px;
  box-sizing:border-box;
}

/* Prevent Square fields from overflowing */

#square-card-container iframe{
  width:100% !important;
  max-width:100% !important;
}

/* Mobile checkout */

@media (max-width:600px){

  .checkoutModalContent,
  .checkoutBox,
  .foodModalBox{
    width:94vw;
    max-width:94vw;
    padding:18px;
    box-sizing:border-box;
  }

  #google-pay-button,
  #cash-app-pay,
  #square-card-container{
    width:100%;
  }
}
/* =========================================
   CHECKOUT MODAL COMPLETE STYLE RESET
========================================= */

#checkoutModal,
#checkoutModal *{
  box-sizing:border-box;
}

#checkoutModal .foodModalOverlay{
  position:fixed;
  inset:0;
  z-index:999999;
  display:flex;
  justify-content:center;
  align-items:center;
  padding:20px;
  background:rgba(0, 0, 0, 0.72);
}

#checkoutModal .foodModalBox,
#checkoutModal .checkoutBox,
#checkoutModal .checkoutModalContent{
  position:relative;
  width:100% !important;
  max-width:560px !important;
  max-height:92vh;
  overflow-y:auto;
  padding:24px !important;
  border-radius:18px;
  background:#ffffff;
  color:#111111;
  font-family:Arial, Helvetica, sans-serif;
  font-size:16px !important;
  line-height:1.45;
}

#checkoutModal h1,
#checkoutModal h2,
#checkoutModal h3,
#checkoutModal h4{
  margin:0 0 10px;
  color:#111111;
  line-height:1.25;
}

#checkoutModal h2{
  font-size:25px !important;
}

#checkoutModal h3{
  margin-top:18px;
  font-size:17px !important;
}

#checkoutModal p,
#checkoutModal label,
#checkoutModal span,
#checkoutModal strong{
  font-size:14px;
}

#checkoutModal input,
#checkoutModal select,
#checkoutModal textarea{
  display:block;
  width:100% !important;
  min-height:46px;
  margin:6px 0 12px;
  padding:10px 12px;
  border:1px solid #cfcfcf;
  border-radius:8px;
  background:#ffffff;
  color:#111111;
  font-size:16px !important;
}

#checkoutModal button{
  min-height:44px;
  font-size:14px !important;
  cursor:pointer;
}

/* CUSTOMER INFORMATION */

#checkoutModal .checkoutContactGrid,
#checkoutModal .contactGrid,
#checkoutModal .customerInfoGrid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

/* PAYMENT OPTION BUTTONS */

#checkoutModal .paymentOption,
#checkoutModal .paymentMethodOption,
#checkoutModal .paymentChoice{
  display:block;
  width:100%;
  margin:8px 0;
  padding:12px;
  border:1px solid #d5d5d5;
  border-radius:8px;
  background:#f8f8f8;
}

/* SQUARE PAYMENT AREA */

#checkoutModal .paymentMethods{
  display:flex;
  flex-direction:column;
  gap:12px;
  width:100%;
  margin-top:14px;
}

#checkoutModal #google-pay-button,
#checkoutModal #cash-app-pay,
#checkoutModal #square-card-container{
  display:block;
  width:100% !important;
  max-width:100% !important;
}

#checkoutModal #google-pay-button,
#checkoutModal #cash-app-pay{
  min-height:46px;
}

#checkoutModal #square-card-container{
  min-height:76px;
  margin-top:4px;
}

#checkoutModal #square-card-container iframe{
  width:100% !important;
  max-width:100% !important;
}

#checkoutModal #square-payment-status{
  width:100%;
  margin:8px 0;
  font-size:14px !important;
  line-height:1.4;
  text-align:center;
  color:#555555;
}

/* ORDER SUMMARY */

#checkoutModal .checkoutSummary,
#checkoutModal .orderSummary{
  margin-top:18px;
  padding-top:14px;
  border-top:1px solid #dddddd;
}

#checkoutModal .checkoutSummaryRow,
#checkoutModal .summaryRow{
  display:flex;
  justify-content:space-between;
  gap:15px;
  margin:7px 0;
  font-size:15px;
}

/* PLACE ORDER BUTTON */

#checkoutModal #placeOrderBtn{
  width:100%;
  min-height:52px;
  margin-top:16px;
  padding:12px 18px;
  border:0;
  border-radius:10px;
  background:#ef304f;
  color:#ffffff;
  font-size:16px !important;
  font-weight:700;
}

/* CLOSE BUTTON */

#checkoutModal .closeModal,
#checkoutModal .foodModalClose,
#checkoutModal .checkoutClose{
  position:absolute;
  top:12px;
  right:12px;
  width:38px;
  height:38px;
  min-height:38px;
  padding:0;
  border:0;
  border-radius:50%;
  background:#f2f2f2;
  color:#111111;
  font-size:22px !important;
}

/* MOBILE */

@media (max-width:600px){

  #checkoutModal .foodModalOverlay{
    align-items:flex-start;
    padding:10px;
  }

  #checkoutModal .foodModalBox,
  #checkoutModal .checkoutBox,
  #checkoutModal .checkoutModalContent{
    width:100% !important;
    max-width:100% !important;
    max-height:96vh;
    padding:18px !important;
    border-radius:14px;
  }

  #checkoutModal .checkoutContactGrid,
  #checkoutModal .contactGrid,
  #checkoutModal .customerInfoGrid{
    grid-template-columns:1fr;
    gap:0;
  }

  #checkoutModal h2{
    font-size:22px !important;
  }
}
/* =========================================
   CHECKOUT BUTTON IMPROVEMENTS
========================================= */

/* Payment method choices */

#checkoutModal .paymentOption,
#checkoutModal .paymentMethodOption,
#checkoutModal .paymentChoice{
  width:100%;
  min-height:48px;
  margin:8px 0;
  padding:11px 16px;
  border:1px solid #d7d7d7;
  border-radius:10px;
  background:#ffffff;
  color:#111111;
  font-size:14px !important;
  font-weight:600;
  text-align:center;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

#checkoutModal .paymentOption:hover,
#checkoutModal .paymentMethodOption:hover,
#checkoutModal .paymentChoice:hover{
  border-color:#ef304f;
  background:#fff5f7;
  transform:translateY(-1px);
}

/* Selected payment method */

#checkoutModal .paymentOption.active,
#checkoutModal .paymentMethodOption.active,
#checkoutModal .paymentChoice.active,
#checkoutModal .paymentOption.selected,
#checkoutModal .paymentMethodOption.selected,
#checkoutModal .paymentChoice.selected{
  border-color:#ef304f;
  background:#fff0f3;
  color:#d91f42;
  box-shadow:0 0 0 2px rgba(239, 48, 79, 0.12);
}

/* Main Place Order button */

#checkoutModal #placeOrderBtn{
  width:100%;
  min-height:54px;
  margin-top:18px;
  padding:14px 20px;
  border:none;
  border-radius:12px;
  background:linear-gradient(
    135deg,
    #f52d50,
    #d91f42
  );
  color:#ffffff;
  font-size:16px !important;
  font-weight:700;
  letter-spacing:0.2px;
  box-shadow:0 8px 18px rgba(217, 31, 66, 0.24);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease;
}

#checkoutModal #placeOrderBtn:hover{
  transform:translateY(-1px);
  box-shadow:0 10px 22px rgba(217, 31, 66, 0.32);
}

#checkoutModal #placeOrderBtn:active{
  transform:translateY(0);
}

#checkoutModal #placeOrderBtn:disabled{
  opacity:0.55;
  cursor:not-allowed;
  box-shadow:none;
}

/* Back button */

#checkoutModal .backBtn,
#checkoutModal #backBtn,
#checkoutModal .checkoutBackBtn{
  width:100%;
  min-height:48px;
  margin-top:10px;
  padding:12px 18px;
  border:2px solid #d6b728;
  border-radius:12px;
  background:#fffdf4;
  color:#7d6812;
  font-size:14px !important;
  font-weight:700;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

#checkoutModal .backBtn:hover,
#checkoutModal #backBtn:hover,
#checkoutModal .checkoutBackBtn:hover{
  background:#fff5bd;
  transform:translateY(-1px);
}

/* Google Pay and Cash App spacing */

#checkoutModal #google-pay-button,
#checkoutModal #cash-app-pay{
  width:100% !important;
  min-height:48px;
  margin:8px 0;
  overflow:hidden;
  border-radius:10px;
}

/* Keep Square-generated buttons full width */

#checkoutModal #google-pay-button > div,
#checkoutModal #cash-app-pay > div{
  width:100% !important;
  max-width:100% !important;
}

/* Mobile */

@media (max-width:600px){

  #checkoutModal #placeOrderBtn{
    min-height:52px;
    font-size:15px !important;
  }

  #checkoutModal .paymentOption,
  #checkoutModal .paymentMethodOption,
  #checkoutModal .paymentChoice{
    min-height:46px;
    padding:10px 12px;
  }
}