/*
 * TISH Paper UX v2 — mobile-first alignment and readable touch controls.
 * Loaded after all v1 sheets; does not change cart/pricing/payment JS.
 */
body.tish-paper.tish-cart-page #cartItems:has(.cart-row) {
  gap:14px!important;
  align-items:stretch!important;
}
body.tish-paper.tish-cart-page #cartItems .cart-row {
  position:relative!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:96px minmax(64px,auto) 45px 48px!important;
  align-content:start!important;
  justify-items:center!important;
  gap:5px!important;
  height:100%!important;
  min-height:309px!important;
  padding:18px 11px 24px!important;
  box-sizing:border-box!important;
  background-image:url('../../tish-paper/paper/category-ivory.webp')!important;
  background-position:center!important;
  background-size:100% 100%!important;
  background-repeat:no-repeat!important;
}
body.tish-paper.tish-cart-page #cartItems .cart-row .cart-thumb {
  grid-row:1!important;
  grid-column:1!important;
  align-self:center!important;
  justify-self:center!important;
  width:96px!important;
  height:96px!important;
  margin:0!important;
}
body.tish-paper.tish-cart-page #cartItems .cart-row .row-copy {
  grid-row:2 / 4!important;
  grid-column:1!important;
  width:100%!important;
  min-height:0!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:1px!important;
  padding:0 7px!important;
  box-sizing:border-box!important;
  text-align:center!important;
}
body.tish-paper.tish-cart-page #cartItems .cart-row .row-copy > strong {
  display:-webkit-box!important;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
  width:100%!important;
  max-height:47px!important;
  min-height:39px!important;
  font-size:clamp(.86rem,3.4vw,1.01rem)!important;
  line-height:1.45!important;
  font-weight:900!important;
  color:#28201c!important;
  text-align:center!important;
}
body.tish-paper.tish-cart-page #cartItems .cart-row .row-copy > span {
  max-width:100%;
  flex:0 0 auto;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
body.tish-paper.tish-cart-page #cartItems .cart-row .row-copy .tish-cart-line-price {
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  align-self:center!important;
  min-width:0!important;
  width:min(100%,122px)!important;
  height:38px!important;
  min-height:38px!important;
  padding:0 7px!important;
  margin:auto 0 0!important;
  font-size:clamp(.92rem,3.5vw,1.02rem)!important;
  line-height:1!important;
  direction:ltr!important;
  unicode-bidi:isolate!important;
  color:#fff9f2!important;
  text-shadow:0 1px 1px #5d1212;
  font-variant-numeric:tabular-nums;
}
body.tish-paper.tish-cart-page #cartItems .cart-row .row-actions {
  grid-row:4!important;
  grid-column:1!important;
  display:flex!important;
  justify-content:center!important;
  align-items:center!important;
  align-self:center!important;
  justify-self:center!important;
  width:100%!important;
  min-width:0!important;
  height:48px!important;
  gap:6px!important;
  padding:0 4px!important;
  flex-wrap:nowrap!important;
}
body.tish-paper.tish-cart-page #cartItems .cart-row .row-actions button[data-inc],
body.tish-paper.tish-cart-page #cartItems .cart-row .row-actions button[data-dec] {
  display:grid!important;
  place-items:center!important;
  flex:0 0 38px!important;
  width:38px!important;
  min-width:38px!important;
  height:38px!important;
  border-radius:50%!important;
  background:#fff1d7!important;
  border:1.5px solid #a47860!important;
  box-shadow:0 2px 2px #553e2c29!important;
  color:#351d17!important;
  font-size:1.36rem!important;
  line-height:1!important;
  font-weight:900!important;
}
body.tish-paper.tish-cart-page #cartItems .cart-row .row-actions b {
  display:grid!important;
  place-items:center!important;
  min-width:25px!important;
  height:36px!important;
  margin:0!important;
  padding:0 1px!important;
  color:#271c16!important;
  background:#fbecd4;
  border-radius:8px;
  font-size:1.12rem!important;
  font-weight:900!important;
  font-variant-numeric:tabular-nums;
}
body.tish-paper.tish-cart-page #cartItems .cart-row .row-actions button[data-remove] {
  position:absolute!important;
  top:12px!important;
  inset-inline-start:10px!important;
  width:38px!important;
  height:38px!important;
  min-width:38px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:50%!important;
  background:#fff0e5!important;
  border:1px solid #c97a69!important;
  box-shadow:0 2px 3px #5b2c271a!important;
  color:#a62120!important;
  font-size:1rem!important;
}
body.tish-paper.tish-cart-page #cartItems .cart-row :is(button[data-inc],button[data-dec],button[data-remove]):focus {
  outline:0!important;
}
body.tish-paper.tish-cart-page #cartItems .cart-row :is(button[data-inc],button[data-dec],button[data-remove]):focus-visible {
  outline:3px solid #332522!important;
  outline-offset:2px!important;
}
body.tish-paper.tish-cart-page #cartItems .cart-row .row-actions button:active {
  transform:scale(.94);
}
@media(max-width:365px) {
  body.tish-paper.tish-cart-page #cartItems:has(.cart-row) {
    gap:7px!important;
  }
  body.tish-paper.tish-cart-page #cartItems .cart-row {
    padding-inline:7px!important;
  }
  body.tish-paper.tish-cart-page #cartItems .cart-row .row-actions {
    gap:3px!important;
    padding:0!important;
  }
  body.tish-paper.tish-cart-page #cartItems .cart-row .row-actions button[data-inc],
  body.tish-paper.tish-cart-page #cartItems .cart-row .row-actions button[data-dec] {
    width:36px!important;
    min-width:36px!important;
    flex-basis:36px!important;
  }
}
@media(min-width:740px) {
  body.tish-paper.tish-cart-page #cartItems .cart-row {
    grid-template-rows:115px minmax(64px,auto) 45px 48px!important;
    min-height:329px!important;
  }
  body.tish-paper.tish-cart-page #cartItems .cart-row .cart-thumb {
    width:112px!important;
    height:112px!important;
  }
}

/* Checkout: cohesive paper controls with text in the safe central artwork. */
body.tish-paper.tish-checkout-page #checkoutForm .checkout-grid {
  display:grid;
  grid-template-columns:minmax(0,1fr)!important;
  gap:14px!important;
}
body.tish-paper.tish-checkout-page #checkoutForm .checkout-grid > label,
body.tish-paper.tish-checkout-page #checkoutForm .checkout-grid > div[role="group"] {
  display:block;
  min-width:0;
  font-weight:800;
  font-size:.94rem;
  line-height:1.6;
  color:#35261f;
}
body.tish-paper.tish-checkout-page #checkoutForm .checkout-grid > label[hidden],
body.tish-paper.tish-checkout-page #checkoutForm .checkout-grid > div[hidden] {
  display:none!important;
}
body.tish-paper.tish-checkout-page #checkoutForm :is(input[name="name"],input[name="phone"],textarea[name="notes"],textarea[name="address"],#paymentReferenceInput,#paymentAccountSelect) {
  display:block!important;
  position:relative;
  width:100%!important;
  min-height:58px!important;
  margin:6px 0 0!important;
  padding:12px clamp(20px,7vw,29px)!important;
  font-family:Cairo,Tajawal,Arial,sans-serif!important;
  font-weight:750!important;
  font-size:16px!important;
  line-height:1.5!important;
  color:#30231d!important;
  caret-color:#8e1b19!important;
  border:0!important;
  border-radius:0!important;
  outline:0!important;
  box-shadow:none!important;
  background-color:transparent!important;
  background-image:url('../../tish-paper/paper/category-ivory.webp')!important;
  background-repeat:no-repeat!important;
  background-position:center center!important;
  background-size:100% 100%!important;
}
body.tish-paper.tish-checkout-page #checkoutForm :is(textarea[name="notes"],textarea[name="address"]) {
  min-height:92px!important;
  padding-top:21px!important;
  padding-bottom:20px!important;
  resize:vertical;
}
body.tish-paper.tish-checkout-page #checkoutForm :is(input[name="name"],input[name="phone"],textarea[name="notes"],textarea[name="address"],#paymentReferenceInput,#paymentAccountSelect)::placeholder {
  color:#887467!important;
  opacity:1;
}
body.tish-paper.tish-checkout-page #checkoutForm :is(input[name="name"],input[name="phone"],textarea[name="notes"],textarea[name="address"],#paymentReferenceInput,#paymentAccountSelect):focus,
body.tish-paper.tish-checkout-page #checkoutForm :is(input[name="name"],input[name="phone"],textarea[name="notes"],textarea[name="address"],#paymentReferenceInput,#paymentAccountSelect):focus-visible,
body.tish-paper.tish-checkout-page #checkoutForm :is(input[name="name"],input[name="phone"],textarea[name="notes"],textarea[name="address"],#paymentReferenceInput,#paymentAccountSelect):invalid:focus {
  outline:0!important;
  outline-offset:0!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  filter:drop-shadow(0 3px 3px #38241c32);
}
body.tish-paper.tish-checkout-page #checkoutForm input[name="phone"] {
  text-align:left!important;
  direction:ltr!important;
  unicode-bidi:plaintext!important;
}
body.tish-paper.tish-checkout-page #checkoutForm :is(input[name="name"],input[name="phone"],textarea[name="notes"],textarea[name="address"]):-webkit-autofill {
  -webkit-text-fill-color:#30231d!important;
  transition:background-color 9999s ease-out 0s;
}

/* Selected items: paper itself changes colour, with no rectangular red outline. */
body.tish-paper.tish-checkout-page #checkoutForm .checkout-service-options {
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:10px!important;
  margin-top:8px!important;
}
body.tish-paper.tish-checkout-page #checkoutForm :is(.checkout-paper-choice,.table-card,.payment-card) {
  position:relative;
  box-sizing:border-box;
  min-width:0!important;
  outline:0!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  background-image:url('../../tish-paper/paper/category-ivory.webp')!important;
  background-color:transparent!important;
  background-size:100% 100%!important;
  background-position:center!important;
  background-repeat:no-repeat!important;
  color:#a4211e!important;
  font-size:clamp(.76rem,3vw,.95rem)!important;
  font-weight:900!important;
  line-height:1.4!important;
  text-align:center!important;
}
body.tish-paper.tish-checkout-page #checkoutForm .checkout-paper-choice {
  min-height:85px!important;
  padding:15px 6px!important;
  gap:5px!important;
}
body.tish-paper.tish-checkout-page #checkoutForm .checkout-paper-choice i {
  font-size:1.16rem!important;
  line-height:1.2;
}
body.tish-paper.tish-checkout-page #checkoutForm :is(.checkout-paper-choice[aria-pressed="true"],.table-card.selected,.payment-card.active) {
  background-image:url('../../tish-paper/paper/nav-active.webp')!important;
  color:#fff7e6!important;
  filter:drop-shadow(0 3px 2px #52211d36);
}
body.tish-paper.tish-checkout-page #checkoutForm :is(.checkout-paper-choice,.table-card,.payment-card):focus-visible {
  outline:2px dashed #4c342a!important;
  outline-offset:3px!important;
}
body.tish-paper.tish-checkout-page #checkoutForm .table-grid {
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:9px!important;
  margin-top:10px!important;
}
body.tish-paper.tish-checkout-page #checkoutForm .table-card {
  min-height:81px!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  align-items:center!important;
  gap:1px!important;
  padding:12px 6px!important;
}
body.tish-paper.tish-checkout-page #checkoutForm .table-card .dot {
  position:absolute!important;
  top:8px!important;
  inset-inline-end:12px!important;
}
body.tish-paper.tish-checkout-page #checkoutForm .table-card small {
  font-size:.73rem!important;
  font-weight:800!important;
  color:#276b42!important;
}
body.tish-paper.tish-checkout-page #checkoutForm .table-card.occupied {
  opacity:.57!important;
  cursor:not-allowed;
}
body.tish-paper.tish-checkout-page #checkoutForm .table-card.occupied small {
  color:#9a2928!important;
}
body.tish-paper.tish-checkout-page #checkoutForm .table-card.selected small {
  color:#fff7e6!important;
}
body.tish-paper.tish-checkout-page #checkoutForm .payment-methods .payment-card {
  min-height:126px!important;
  padding:17px 8px!important;
}
body.tish-paper.tish-checkout-page #checkoutForm .payment-methods .payment-card .p-copy {
  min-width:0;
  text-align:center;
}

/* Keep summary and bottom navigation legible on narrow phones. */
@media(min-width:670px) {
  body.tish-paper.tish-checkout-page #checkoutForm .checkout-grid {
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  body.tish-paper.tish-checkout-page #checkoutForm .table-grid {
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
}
@media(max-width:370px) {
  body.tish-paper.tish-checkout-page #checkoutForm .checkout-service-options {gap:5px!important}
  body.tish-paper.tish-checkout-page #checkoutForm .checkout-paper-choice {
    padding:11px 3px!important;
    font-size:.72rem!important;
  }
}
@media(prefers-reduced-motion:reduce){
  body.tish-paper.tish-cart-page #cartItems .cart-row button,
  body.tish-paper.tish-checkout-page #checkoutForm :is(input,textarea,button) {transition:none!important}
}
