/* Checkout spacing only. Keep desktop, typography and touch-control sizes intact. */
@media(max-width:700px){
 .ir-checkout-layout{gap:20px}
 .ir-checkout-layout>.ir-order-summary{padding:16px}
 .ir-checkout-layout>.ir-order-summary h2{margin-bottom:14px}
 .ir-checkout-layout>.ir-order-summary .ir-summary-item{margin-bottom:12px}
 .ir-checkout-layout>.ir-order-summary .ir-totals{padding-top:12px;margin:12px 0 0}
 .ir-checkout-form .ir-form-section{margin:0 0 16px;padding:0 0 12px}
 .ir-checkout-form .ir-form-section h2{margin:0 0 12px}
 .ir-checkout-form .ir-form-section>p:last-child{margin-bottom:0}
 .ir-checkout-form .ir-fields{row-gap:12px}
 .ir-checkout-form .ir-form-section>.ir-field{margin-bottom:12px}
 .ir-checkout-form .ir-checkout-policies{gap:8px 14px;margin:4px 0 12px}
 .ir-checkout-form [data-form-error]:empty{display:none}
}

/* Mobile purchase pages: remove catalog chrome and nested summary panels. */
@media(max-width:700px){
 body:has(.ir-checkout-layout,.ir-cart-layout,.ir-account-layout) .ir-header .ir-search,
 body:has(.ir-checkout-layout,.ir-cart-layout,.ir-account-layout) .ir-filter-trigger,
 body:has(.ir-checkout-layout,.ir-cart-layout,.ir-account-layout) .ir-drop-nav{display:none}
 body:has(.ir-checkout-layout,.ir-cart-layout,.ir-account-layout) .ir-header-row{grid-template-areas:'brand actions';padding:12px 16px;row-gap:0}
 .ir-main:has(.ir-checkout-layout,.ir-cart-layout,.ir-account-layout){padding-top:12px}
 .ir-main:has(.ir-checkout-layout,.ir-cart-layout,.ir-account-layout)>.ir-page-title{margin:8px 0 16px}
 .ir-checkout-layout{gap:16px}
 .ir-checkout-layout>.ir-order-summary,.ir-cart-layout>.ir-order-summary{padding:0;background:transparent;border:0;border-radius:0;box-shadow:none}
 .ir-checkout-layout>.ir-order-summary h2{margin:0 0 10px}
 .ir-checkout-layout>.ir-order-summary .ir-totals{padding-top:10px;margin-top:10px}
 .ir-checkout-form .ir-form-section{margin-bottom:14px;padding-bottom:10px}
}

/* Mobile footer only; append after the current IINANNA checkout overlay. */
@media (max-width:700px) {
  .ir-footer.ir-legal-footer {
    display:grid;
    grid-template-columns:minmax(0,1fr);
    gap:8px;
    padding:16px 16px calc(16px + env(safe-area-inset-bottom));
    font-size:12px;
    line-height:1.45;
  }
  .ir-footer.ir-legal-footer .ir-footer-identity {
    display:flex;
    flex-wrap:wrap;
    align-items:baseline;
    gap:0 14px;
    font-size:12px;
    line-height:1.45;
  }
  .ir-footer.ir-legal-footer .ir-footer-identity > strong,
  .ir-footer.ir-legal-footer .ir-footer-shopping {
    display:none;
  }
  .ir-footer.ir-legal-footer .ir-footer-identity p {
    flex-basis:100%;
    margin:0 0 4px;
    font-size:12px;
    line-height:1.45;
    overflow-wrap:anywhere;
  }
  .ir-footer.ir-legal-footer .ir-footer-identity a,
  .ir-footer.ir-legal-footer .ir-footer-care a {
    display:inline-flex;
    align-items:center;
    min-height:36px;
    padding:4px 0;
    margin:0;
    font-size:12px;
    line-height:1.45;
    overflow-wrap:anywhere;
  }
  .ir-footer.ir-legal-footer .ir-footer-care {
    display:flex!important;
    flex-wrap:wrap;
    align-items:center;
    gap:0 16px!important;
    margin:0;
    padding:0;
  }
  .ir-footer.ir-legal-footer > small {
    margin:0;
    padding:0;
    font-size:11px;
    line-height:1.4;
  }
  /* Checkout already shows these links immediately beside the payment action. */
  body:has(.ir-checkout-policies) .ir-footer-care a:is(
    [href$="/policies/terms"],
    [href$="/policies/shipping"],
    [href$="/policies/returns"],
    [href$="/policies/privacy"]
  ) {
    display:none;
  }
}

/* Keep field labels and meaningful sections. Compact only self-describing actions. */
@media (max-width:700px) {
  .ir-checkout-form .ir-form-section:has(> [data-calculate-delivery]) > h2,
  .ir-checkout-form .ir-form-section:has(> [data-payment-checkout]) > h2 {
    position:absolute;
    width:1px;
    height:1px;
    padding:0;
    margin:-1px;
    overflow:hidden;
    clip-path:inset(50%);
    white-space:nowrap;
    border:0;
  }
  .ir-checkout-form [data-calculate-delivery],
  .ir-checkout-form [data-payment-checkout] {
    width:100%;
    min-height:48px;
  }
  /* Same form and submit action: retain Pay instead of a second confirmation button. */
  .ir-checkout-form:has([data-payment-checkout]) > button[data-order-submit] {
    display:none;
  }
}

@media(max-width:700px){.ir-footer.ir-legal-footer .ir-footer-identity>a[href^="mailto:"],.ir-footer.ir-legal-footer .ir-footer-identity>a[href^="tel:"]{display:none}}
