/* Disputely Protect — inline checkout buttons + info popover.
   Namespaced under .dsp-protect- to never collide with themes. Themes ship
   aggressive global button/typography rules, so layout-critical properties
   are !important'd. The primary button's colors/radius/font are copied from
   the theme's own checkout button at runtime; these are fallbacks. */

.dsp-protect-inline {
  display: block !important;
  width: 100% !important;
  margin-top: 4px;
  text-align: left !important;
}

/* Fee row: "Package protection (i) / Protect your package" left, fee right. */
.dsp-protect-fee-row {
  position: relative !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px;
  width: 100% !important;
  margin: 6px 0 10px !important;
  line-height: 1.35 !important;
}

.dsp-protect-fee-left {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  text-align: left !important;
}

.dsp-protect-fee-title {
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 4px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #1a1a1a !important;
}

.dsp-protect-fee-sub {
  display: block !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  color: #777 !important;
  text-align: left !important;
}

.dsp-protect-fee-amount {
  flex: 0 0 auto !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  color: #1a1a1a !important;
  white-space: nowrap !important;
}

/* Toggle style: slim switch row on its own full-width line above the theme's
   checkout button. The container must escape flex/grid parents' sizing. */
.dsp-protect-inline-toggle {
  flex: 0 0 100% !important;
  min-width: 100% !important;
  grid-column: 1 / -1 !important;
  margin: 12px 0 !important;
}

.dsp-protect-toggle-row {
  position: relative !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 9px 12px !important;
  border: 1px solid #e5e5e5 !important;
  border-radius: 8px !important;
  background: #fff !important;
  line-height: 1.3 !important;
  box-sizing: border-box !important;
}

.dsp-protect-toggle-text {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  text-align: left !important;
}

/* Keep the toggle row's text a notch smaller than the buttons style. */
.dsp-protect-toggle-row .dsp-protect-fee-title { font-size: 12.5px !important; }
/* The sub must WRAP, never nowrap-ellipsize. Table-layout cart drawers size
   to their content's intrinsic min width, and nowrap text's min width is the
   whole sentence, so it widened the drawer and caused a horizontal scrollbar.
   Wrapped text's min width is ~one word; clamp to 2 lines as a ceiling for
   long per-merchant copy overrides. */
.dsp-protect-toggle-row .dsp-protect-fee-sub {
  font-size: 11px !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
  overflow: hidden !important;
  max-width: 100% !important;
}
.dsp-protect-toggle-row .dsp-protect-fee-amount { font-size: 12.5px !important; }

.dsp-protect-switch {
  position: relative !important;
  flex: 0 0 auto !important;
  width: 36px !important;
  min-width: 36px !important;
  height: 20px !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 999px !important;
  background: #c9c9c9 !important;
  box-shadow: none !important;
  cursor: pointer !important;
  transition: background 0.18s ease !important;
}
.dsp-protect-switch.dsp-on { background: #1a1a1a !important; }

.dsp-protect-switch-knob {
  position: absolute !important;
  top: 3px !important;
  left: 3px !important;
  width: 14px !important;
  height: 14px !important;
  border-radius: 50% !important;
  background: #fff !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25) !important;
  transition: transform 0.18s ease !important;
  display: block !important;
}
.dsp-protect-switch.dsp-on .dsp-protect-switch-knob {
  transform: translateX(16px) !important;
}

/* Checkbox style: same row chrome as the toggle, but with a leading shield
   icon and the control as a square checkbox on the RIGHT with the price
   beside it (Route-style: icon | text | price | checkbox). The row div
   carries both classes (toggle-row for the shared chrome, checkbox-row as
   the hook for per-merchant customCss tweaks). */
.dsp-protect-row-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  color: #1a1a1a !important;
}
.dsp-protect-row-icon svg {
  width: 26px !important;
  height: 26px !important;
  display: block !important;
}
/* Icon rows read best with the title a notch bolder/larger (reference). */
.dsp-protect-checkbox-row .dsp-protect-fee-title { font-weight: 700 !important; }
.dsp-protect-checkbox {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  width: 20px !important;
  min-width: 20px !important;
  height: 20px !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1.5px solid #b5b5b5 !important;
  border-radius: 5px !important;
  background: #fff !important;
  box-shadow: none !important;
  color: #fff !important;
  cursor: pointer !important;
  transition: background 0.15s ease, border-color 0.15s ease !important;
}
.dsp-protect-checkbox svg {
  width: 12px !important;
  height: 12px !important;
  display: block !important;
  opacity: 0 !important;
  transition: opacity 0.15s ease !important;
}
.dsp-protect-checkbox.dsp-on {
  background: #1a1a1a !important;
  border-color: #1a1a1a !important;
}
.dsp-protect-checkbox.dsp-on svg { opacity: 1 !important; }

.dsp-protect-fee-off {
  color: #999 !important;
  text-decoration: line-through !important;
}

.dsp-protect-info {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 16px !important;
  min-width: 0 !important;
  height: 16px !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 50% !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #999 !important;
  line-height: 1 !important;
  cursor: pointer !important;
}
.dsp-protect-info svg {
  width: 14px !important;
  height: 14px !important;
  display: block !important;
}
.dsp-protect-info:hover { color: #333 !important; }

/* Info modal — centered card, information only, no action buttons.
   Rendered as a native <dialog> (top layer): reset UA dialog styles so the
   overlay spans the full viewport and paints its own dim. */
.dsp-protect-modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483000 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  border: none !important;
  outline: none !important;
  padding: 20px !important;
  background: rgba(0, 0, 0, 0.45) !important;
}
.dsp-protect-modal-overlay::backdrop {
  background: transparent;
}

.dsp-protect-modal {
  position: relative !important;
  width: 100% !important;
  max-width: 392px !important;
  max-height: 85vh !important;
  overflow-y: auto !important;
  padding: 24px 24px 20px !important;
  background: #fff !important;
  color: #1a1a1a !important;
  border-radius: 12px !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25) !important;
  text-align: left !important;
}

/* Banner variant (config modal.variant = 'banner'): full-bleed image across
   the top of the card, Onward-style. Negative margins escape the card
   padding; the card's own radius clips the corners via overflow. */
.dsp-protect-modal-banner {
  margin: -24px -24px 18px !important;
  border-radius: 12px 12px 0 0 !important;
  overflow: hidden !important;
  background: #f4f4f6 !important;
}
.dsp-protect-modal-banner img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-height: 190px !important;
  object-fit: cover !important;
}

.dsp-protect-modal-close {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 26px !important;
  height: 26px !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 50% !important;
  background: #f2f2f2 !important;
  color: #666 !important;
  cursor: pointer !important;
}
.dsp-protect-modal-close svg { width: 13px !important; height: 13px !important; }
.dsp-protect-modal-close:hover { background: #e8e8e8 !important; color: #1a1a1a !important; }

/* Merchant logo: rendered as-is (no forced circle/ring — the file's own
   shape wins), left-aligned. Only the no-logo fallback icon gets a ring. */
.dsp-protect-modal-logo {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  margin: 2px 0 10px !important;
}
.dsp-protect-modal-logo img {
  display: block !important;
  height: 86px !important;
  width: auto !important;
  max-width: 190px !important;
  object-fit: contain !important;
}
.dsp-protect-modal-logo-fallback {
  justify-content: center !important;
  width: 70px !important;
  height: 70px !important;
  border: 1px solid #ececec !important;
  border-radius: 50% !important;
  background: #fff !important;
  color: #1a1a1a !important;
}
.dsp-protect-modal-logo-fallback svg { width: 32px !important; height: 32px !important; }

/* Left-aligned header, tight rhythm (Redo-style card). */
.dsp-protect-modal-title {
  margin: 0 0 2px !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  color: #111 !important;
  text-align: left !important;
}

.dsp-protect-modal-sub {
  margin: 0 0 15px !important;
  font-size: 12px !important;
  line-height: 1.55 !important;
  color: #303030 !important;
  text-align: left !important;
}

.dsp-protect-modal-benefits {
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
}

.dsp-protect-benefit {
  display: flex !important;
  align-items: flex-start !important;
  gap: 11px !important;
}

/* Small line icons in a thin rounded box (matches the reference card). */
.dsp-protect-benefit-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 30px !important;
  height: 30px !important;
  margin-top: 1px !important;
  flex-shrink: 0 !important;
  border: 1px solid #e6e6e6 !important;
  border-radius: 7px !important;
  background: #fff !important;
  color: #111 !important;
}
.dsp-protect-benefit-icon svg { width: 15px !important; height: 15px !important; }

.dsp-protect-benefit-text {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}
.dsp-protect-benefit-text strong {
  font-size: 12.5px !important;
  font-weight: 700 !important;
  color: #111 !important;
  line-height: 1.35 !important;
}
.dsp-protect-benefit-text span {
  font-size: 11px !important;
  line-height: 1.5 !important;
  color: #6e6e6e !important;
}

/* Fine print (default consent line or config modal.footer): purchase
   consent, recurring-charge disclosure for subscription stores, etc. */
.dsp-protect-modal-footer {
  margin: 26px 0 0 !important;
  font-size: 10px !important;
  line-height: 1.6 !important;
  color: #878787 !important;
  text-align: left !important;
}
.dsp-protect-modal-footer a,
.dsp-protect-modal-footer .dsp-protect-modal-link {
  color: #2563eb !important;
  text-decoration: underline !important;
  text-underline-offset: 2px !important;
}

/* Primary: THE checkout button (theme colors applied at runtime). */
.dsp-protect-primary {
  display: block !important;
  width: 100% !important;
  padding: 14px 16px !important;
  border: none !important;
  border-radius: 6px;
  background: #1a1a1a;
  color: #fff;
  font-size: 15px !important;
  font-weight: 600 !important;
  font-family: inherit;
  text-align: center !important;
  cursor: pointer !important;
  transition: opacity 0.15s ease;
}
.dsp-protect-primary:hover { opacity: 0.9; }
.dsp-protect-loading { opacity: 0.6 !important; cursor: wait !important; }

/* Secondary: plain underlined text link — no border, no background, ever. */
.dsp-protect-secondary {
  display: block !important;
  width: 100% !important;
  margin: 10px 0 0 !important;
  padding: 0 !important;
  border: none !important;
  outline: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #555 !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  font-family: inherit;
  text-align: center !important;
  text-decoration: underline !important;
  text-underline-offset: 2px !important;
  min-height: 0 !important;
  cursor: pointer !important;
}
.dsp-protect-secondary:hover { color: #1a1a1a !important; }
