/* Shop modals — standalone file (not purged by Tailwind build) */

body.shop-modal-open {
  overflow: hidden;
}

/* Product type picker modal */
.shop-picker-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.shop-picker-modal[hidden] {
  display: none !important;
}

.shop-picker-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.shop-picker-modal__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 16px;
  padding: 1.75rem 1.5rem 1.5rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
  font-family: "Noto Sans JP", sans-serif;
}

.shop-picker-modal__close-x {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2rem;
  height: 2rem;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  color: #6b7280;
  cursor: pointer;
}

.shop-picker-modal__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #111;
  margin: 0 0 0.5rem;
  padding-right: 2rem;
}

.shop-picker-modal__lead {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0 0 1.25rem;
  line-height: 1.5;
}

.shop-picker-modal__pills {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.shop-picker-modal__pill {
  display: block;
  width: 100%;
  padding: 0.875rem 1rem;
  text-align: left;
  font-size: 0.9375rem;
  font-weight: 500;
  font-family: "Noto Sans JP", sans-serif;
  color: #374151;
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 9999px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.shop-picker-modal__pill:hover {
  border-color: #9ca3af;
}

.shop-picker-modal__pill.is-selected {
  border-color: #111;
  color: #111;
  font-weight: 600;
}

.shop-picker-modal__actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.shop-picker-modal__next {
  width: 100%;
  padding: 14px;
  background: #4a77be;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  font-family: "Noto Sans JP", sans-serif;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.shop-picker-modal__next:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.shop-picker-modal__next:not(:disabled):hover {
  background: #3d6aaf;
}

.shop-picker-modal__cancel {
  width: 100%;
  padding: 10px;
  background: transparent;
  color: #6b7280;
  font-size: 0.875rem;
  font-family: "Noto Sans JP", sans-serif;
  border: none;
  cursor: pointer;
}

/* Checkout modal — variant + quantity */
.shop-checkout-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.shop-checkout-modal[hidden] {
  display: none !important;
}

.shop-checkout-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.shop-checkout-modal__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 16px;
  padding: 1.5rem 1.25rem 1.25rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
  font-family: "Noto Sans JP", sans-serif;
}

.shop-checkout-modal__close-x {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 2rem;
  height: 2rem;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  color: #6b7280;
  cursor: pointer;
}

.shop-checkout-modal__title {
  font-size: 1rem;
  font-weight: 700;
  color: #111;
  margin: 0 0 1.25rem;
  padding-right: 1.5rem;
}

.shop-checkout-modal__body {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.shop-checkout-loading {
  text-align: center;
  color: #6b7280;
  font-size: 0.875rem;
  padding: 1rem 0;
}

.shop-checkout-option__label {
  display: block;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #111;
  margin: 0 0 0.625rem;
}

.shop-checkout-option__pills {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.shop-checkout-option__pills--row {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.shop-checkout-pill {
  display: inline-block;
  box-sizing: border-box;
  margin: 0;
  padding: 0.75rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 500;
  font-family: "Noto Sans JP", sans-serif;
  line-height: 1.3;
  color: #6b7280;
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 9999px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.15s ease, color 0.15s ease, font-weight 0.15s ease;
}

.shop-checkout-pill:hover {
  border-color: #9ca3af;
}

.shop-checkout-pill.is-selected {
  border-color: #111;
  border-width: 2px;
  color: #111;
  font-weight: 600;
}

.shop-checkout-pill--wide {
  display: block;
  width: 100%;
  text-align: center;
}

.shop-checkout-qty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 280px;
  padding: 0.4rem 0.6rem;
  background: #fdf2f4;
  border-radius: 9999px;
}

.shop-checkout-qty__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #e5e7eb;
  color: #374151;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.shop-checkout-qty__btn:hover {
  background: #d1d5db;
}

.shop-checkout-qty__value {
  min-width: 2.5rem;
  text-align: center;
  font-size: 1.0625rem;
  font-weight: 600;
  color: #111;
}

.shop-checkout-modal__buy {
  display: block;
  width: 100%;
  margin-top: 1.5rem;
  padding: 14px;
  background: #4a77be;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  font-family: "Noto Sans JP", sans-serif;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.shop-checkout-modal__buy:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.shop-checkout-modal__buy:not(:disabled):hover {
  background: #3d6aaf;
}

/* Mobile — compact layout */
@media (max-width: 767px) {
  .shop-picker-modal__dialog,
  .shop-checkout-modal__dialog {
    max-width: calc(100% - 1.5rem);
    padding: 1.25rem 1rem 1rem;
  }

  .shop-picker-modal__title,
  .shop-checkout-modal__title {
    font-size: 1rem;
  }

  .shop-picker-modal__pill {
    padding: 0.75rem 0.875rem;
    font-size: 0.875rem;
  }

  .shop-checkout-pill {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
  }

  .shop-checkout-qty {
    max-width: 100%;
  }

  .shop-picker-modal__next,
  .shop-checkout-modal__buy {
    padding: 12px;
    font-size: 0.9375rem;
  }
}
