/* Minimal shared UI for storefront overlays (e.g. onboarding modal) */

/* Ensure modal lock doesn't shift layout unexpectedly */
html.overflow-hidden,
body.overflow-hidden {
  overflow: hidden !important;
}

/* Always keep storefront modal above slider/header/PWA chrome */
.storefront-modal-root {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483647 !important;
  overflow: auto !important; /* allows small screens to scroll the overlay */
  -webkit-overflow-scrolling: touch;
}

.storefront-modal-backdrop {
  position: fixed !important;
  inset: 0 !important;
}

/* Modal card: mobile-friendly internal scrolling */
.storefront-modal-card {
  width: min(28rem, 100%);
  max-height: calc(100dvh - 2rem);
  overflow: hidden;
  border-radius: 1.75rem;
  background: #fff;
  box-shadow: 0 30px 60px rgba(0,0,0,0.35);
  display: flex;
  flex-direction: column;
}

.storefront-modal-card__body {
  flex: 1 1 auto;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

@supports not (height: 100dvh) {
  .storefront-modal-card { max-height: calc(100vh - 2rem); }
}

.storefront-field {
  width: 100%;
  border-radius: 9999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  padding: 0.875rem 1rem;
  font-size: 0.95rem;
  line-height: 1.25rem;
  color: #0f172a;
  outline: none;
}
.storefront-field:focus {
  border-color: rgba(228, 0, 43, 0.85);
  box-shadow: 0 0 0 4px rgba(228, 0, 43, 0.12);
}

.storefront-primary-btn {
  width: 100%;
  border-radius: 9999px;
  padding: 0.95rem 1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

/* Custom dropdown (mobile-friendly, renders inside modal) */
.storefront-dropdown {
  position: relative;
}

.storefront-dropdown__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.storefront-dropdown__value {
  flex: 1 1 auto;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.storefront-dropdown__chev {
  flex: 0 0 auto;
  width: 1.25rem;
  height: 1.25rem;
  opacity: 0.7;
}

.storefront-dropdown__menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.5rem);
  z-index: 30;
  border-radius: 1rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 20px 40px rgba(0,0,0,0.18);
  overflow: hidden;
}

.storefront-dropdown__menuInner {
  max-height: 14rem;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.storefront-dropdown__option {
  width: 100%;
  text-align: left;
  padding: 0.85rem 1rem;
  font-weight: 700;
  color: #0f172a;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.storefront-dropdown__option:hover,
.storefront-dropdown__option[aria-selected="true"] {
  background: rgba(228, 0, 43, 0.10);
}

.storefront-dropdown__option + .storefront-dropdown__option {
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

/* Checkout / cart: promo strip + order summary accents (#E4002B → black) */
.checkout-promo-gradient-bg {
  background: linear-gradient(135deg, #e4002b 0%, #111111 100%);
}
.checkout-summary-price-gradient {
  color: transparent;
  background-image: linear-gradient(135deg, #e4002b 0%, #111111 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Checkout: "Change" button (black bg, red text) */
.checkout-change-btn {
  background: #111111;
  color: var(--color-brand-primary, #e4002b);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18);
}
.checkout-change-btn:hover {
  background: #000000;
  border-color: rgba(255, 255, 255, 0.22);
}
.checkout-change-btn:active {
  transform: translateY(0.5px);
}
.checkout-change-btn:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--color-brand-primary, #e4002b) 20%, transparent),
    0 10px 18px rgba(0, 0, 0, 0.18);
}

/* Checkout: order settings card gradient (black/red) */
.checkout-order-settings-card {
  background: linear-gradient(135deg, var(--color-brand-primary, #e4002b) 0%, #111111 72%);
  border-color: rgba(15, 23, 42, 0.12);
}
.checkout-order-settings-label {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 600;
}
.checkout-order-settings-pill {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  backdrop-filter: blur(6px);
}

/* Checkout submit: WhatsApp (COD) vs theme primary (card) */
.checkout-submit-whatsapp {
  background: #25d366;
  border: 1px solid rgba(0, 0, 0, 0.06);
}
.checkout-submit-whatsapp:hover {
  background: #20ba5a;
}
.checkout-submit-theme {
  background: #e4002b;
  border: 1px solid #c30024;
}
.checkout-submit-theme:hover {
  background: #c30024;
}

