/* Cube storefront checkout modal structure and form clarity. Fonts are inherited unchanged. */

.ph-storefront-root .ph-checkout-dialog {
  width: min(1160px, calc(100vw - 32px)) !important;
  max-width: 1160px !important;
  max-height: calc(100dvh - 32px) !important;
  overflow: hidden !important;
  border-radius: 28px !important;
  background: var(--commerce-bg) !important;
}

.ph-storefront-root .ph-checkout-content {
  width: 100%;
  max-height: calc(100dvh - 32px);
  padding: clamp(26px, 3vw, 38px) !important;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}

.ph-storefront-root .ph-checkout-header {
  min-width: 0;
  margin-bottom: 28px;
  padding: 0 70px 24px 0;
  border-bottom: 1px solid var(--commerce-border);
}

.ph-storefront-root .ph-checkout-eyebrow {
  margin: 0 0 8px;
  color: var(--commerce-accent-strong) !important;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .15em;
}

.ph-storefront-root .ph-checkout-main-title {
  max-width: 760px;
  margin: 0;
  color: var(--commerce-ink) !important;
  font-size: clamp(29px, 3.4vw, 40px) !important;
  line-height: 1.16 !important;
  letter-spacing: -.045em;
  word-break: keep-all;
  overflow-wrap: break-word;
  text-wrap: balance;
}

.ph-storefront-root .ph-checkout-desc {
  max-width: 760px;
  margin: 11px 0 0;
  color: var(--commerce-muted) !important;
  font-size: 14px;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: break-word;
  text-wrap: pretty;
}

.ph-storefront-root .ph-checkout-grid {
  display: grid !important;
  grid-template-columns: minmax(0, .9fr) minmax(430px, 1.1fr) !important;
  gap: 24px !important;
  width: 100%;
  min-width: 0;
  align-items: start;
}

.ph-storefront-root .ph-checkout-col-summary,
.ph-storefront-root .ph-checkout-col-form {
  display: grid;
  min-width: 0;
  gap: 14px;
  align-content: start;
}

.ph-storefront-root .ph-checkout-prod-card,
.ph-storefront-root .ph-checkout-options-box,
.ph-storefront-root .ph-calc-breakdown,
.ph-storefront-root .ph-checkout-trust-box,
.ph-storefront-root .ph-form-section,
.ph-storefront-root .ph-pay-method-panel,
.ph-storefront-root .ph-order-number-card,
.ph-storefront-root .ph-receipt-summary,
.ph-storefront-root .ph-bank-guide-card {
  min-width: 0;
  border: 1px solid var(--commerce-border) !important;
  border-radius: 20px !important;
  background: var(--commerce-surface) !important;
  box-shadow: none !important;
}

.ph-storefront-root .ph-checkout-prod-card {
  display: grid !important;
  grid-template-columns: 82px minmax(0, 1fr) !important;
  gap: 14px !important;
  align-items: center;
  padding: 14px !important;
}

.ph-storefront-root .ph-checkout-thumb-wrap {
  width: 82px !important;
  height: 82px !important;
  overflow: hidden;
  border-radius: 14px !important;
  background: var(--commerce-surface-soft);
}

.ph-storefront-root .ph-checkout-thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ph-storefront-root .ph-checkout-prod-meta {
  min-width: 0;
}

.ph-storefront-root .ph-checkout-cat {
  color: var(--commerce-accent-strong) !important;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}

.ph-storefront-root .ph-checkout-title {
  margin: 5px 0 8px;
  color: var(--commerce-ink) !important;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.4;
  white-space: normal !important;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.ph-storefront-root .ph-checkout-spec-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ph-storefront-root .ph-chip {
  display: inline-flex;
  max-width: 100%;
  min-height: 25px;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--commerce-surface-soft) !important;
  color: var(--commerce-muted) !important;
  font-size: 10px;
  line-height: 1.3;
  white-space: normal;
}

.ph-storefront-root .ph-checkout-options-box,
.ph-storefront-root .ph-calc-breakdown,
.ph-storefront-root .ph-checkout-trust-box,
.ph-storefront-root .ph-form-section {
  padding: 18px !important;
}

.ph-storefront-root .ph-option-row + .ph-option-row {
  margin-top: 16px;
}

.ph-storefront-root .ph-opt-lbl {
  display: block;
  margin-bottom: 9px;
  color: var(--commerce-muted) !important;
  font-size: 12px;
  font-weight: 800;
}

.ph-storefront-root .ph-color-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ph-storefront-root .ph-color-pill {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 7px;
  padding: 8px 12px !important;
  border: 1px solid var(--commerce-border) !important;
  border-radius: 999px !important;
  background: var(--commerce-surface) !important;
  color: var(--commerce-muted) !important;
  line-height: 1.3;
  white-space: nowrap;
}

.ph-storefront-root .ph-color-pill.active {
  border-color: var(--commerce-accent-strong) !important;
  background: var(--commerce-surface-accent) !important;
  color: var(--commerce-ink) !important;
  box-shadow: inset 0 0 0 1px var(--commerce-accent-strong);
}

.ph-storefront-root .ph-calc-row,
.ph-storefront-root .ph-calc-total-row,
.ph-storefront-root .ph-receipt-row,
.ph-storefront-root .ph-receipt-total-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.ph-storefront-root .ph-calc-row + .ph-calc-row,
.ph-storefront-root .ph-receipt-row + .ph-receipt-row {
  margin-top: 10px;
}

.ph-storefront-root .ph-calc-hint {
  margin: 8px 0 0;
  color: var(--commerce-faint) !important;
  font-size: 10px;
  line-height: 1.55;
}

.ph-storefront-root .ph-calc-divider {
  height: 1px;
  margin: 15px 0;
  background: var(--commerce-border);
}

.ph-storefront-root .ph-calc-total-row {
  font-size: 15px;
  font-weight: 900;
}

.ph-storefront-root .ph-calc-total-val,
.ph-storefront-root .ph-receipt-highlight {
  color: var(--commerce-accent-strong) !important;
  font-size: 24px;
  font-weight: 900;
  white-space: nowrap;
}

.ph-storefront-root .ph-checkout-trust-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: linear-gradient(135deg, #f5fbf8, #fffdf9) !important;
  color: var(--commerce-muted) !important;
  line-height: 1.55;
}

.ph-storefront-root .ph-trust-icon {
  flex: 0 0 auto;
  color: var(--commerce-accent-strong) !important;
}

.ph-storefront-root .ph-form-section {
  display: grid;
  gap: 17px;
}

.ph-storefront-root .ph-form-sec-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 1px;
  color: var(--commerce-ink) !important;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.35;
}

.ph-storefront-root .ph-form-group {
  display: grid;
  min-width: 0;
  gap: 8px;
  margin: 0 !important;
}

.ph-storefront-root .ph-form-group > label {
  color: var(--commerce-muted) !important;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}

.ph-storefront-root .ph-required {
  color: var(--commerce-danger) !important;
}

.ph-storefront-root .ph-input,
.ph-storefront-root .ph-cash-input {
  width: 100% !important;
  min-width: 0;
  min-height: 52px !important;
  border: 1px solid var(--commerce-border-strong) !important;
  border-radius: 13px !important;
  outline: none;
  background: #fff !important;
  color: var(--commerce-ink) !important;
  -webkit-text-fill-color: var(--commerce-ink);
  color-scheme: light;
  padding: 12px 14px !important;
  font-size: 15px !important;
  line-height: 1.45;
  box-shadow: inset 0 1px 2px rgba(51, 72, 64, .035);
}

.ph-storefront-root .ph-input::placeholder,
.ph-storefront-root .ph-cash-input::placeholder {
  color: #99a49f !important;
  -webkit-text-fill-color: #99a49f;
  opacity: 1;
}

.ph-storefront-root .ph-input:hover,
.ph-storefront-root .ph-cash-input:hover {
  border-color: var(--commerce-accent) !important;
}

.ph-storefront-root .ph-input:focus,
.ph-storefront-root .ph-cash-input:focus {
  border-color: var(--commerce-accent-strong) !important;
  box-shadow: 0 0 0 4px rgba(114, 174, 154, .17) !important;
}

.ph-storefront-root .ph-input.error {
  border-color: var(--commerce-danger) !important;
  background: #fffafa !important;
  box-shadow: 0 0 0 3px rgba(215, 85, 85, .1) !important;
}

.ph-storefront-root .ph-field-err {
  margin: -1px 1px 0;
  color: var(--commerce-danger) !important;
  font-size: 11px;
  line-height: 1.45;
}

.ph-storefront-root .ph-checkout-success-view {
  width: min(680px, 100%);
  margin-inline: auto;
  padding: 10px 0;
  text-align: center;
}

.ph-storefront-root .ph-success-badge-icon {
  display: grid;
  width: 72px;
  height: 72px;
  margin: 0 auto 17px;
  place-items: center;
  border-radius: 50%;
  background: var(--commerce-surface-accent);
  color: var(--commerce-accent-strong);
}

.ph-storefront-root .ph-success-title {
  margin: 0;
  color: var(--commerce-ink) !important;
  font-size: clamp(27px, 4vw, 38px) !important;
  line-height: 1.2;
  letter-spacing: -.04em;
}

.ph-storefront-root .ph-success-sub {
  max-width: 540px;
  margin: 10px auto 24px;
  color: var(--commerce-muted) !important;
  line-height: 1.7;
  text-wrap: pretty;
}

.ph-storefront-root .ph-order-number-card,
.ph-storefront-root .ph-receipt-summary,
.ph-storefront-root .ph-bank-guide-card {
  margin-top: 12px;
  padding: 18px !important;
  text-align: left;
}

.ph-storefront-root .ph-order-num-value {
  margin-top: 5px;
  color: var(--commerce-accent-strong) !important;
  font-size: 21px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.ph-storefront-root .ph-trust-pills-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.ph-storefront-root .ph-trust-pill {
  padding: 8px 11px;
  border: 1px solid var(--commerce-border);
  border-radius: 999px;
  background: var(--commerce-surface);
  color: var(--commerce-muted);
  font-size: 11px;
}

.ph-storefront-root .ph-success-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

@media (min-width: 1181px) {
  .ph-storefront-root .ph-checkout-col-summary {
    position: sticky;
    top: 0;
  }
}

@media (max-width: 1180px) {
  .ph-storefront-root .ph-checkout-dialog {
    width: min(820px, calc(100vw - 24px)) !important;
    max-width: 820px !important;
  }

  .ph-storefront-root .ph-checkout-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 16px !important;
  }

  .ph-storefront-root .ph-checkout-col-summary {
    position: static;
  }
}
