/* policies.css — legal-policy popup modal for the footer links.
 * Shared by checkout, thank-you and offer (index) pages. Matches the Shopify
 * checkout "Refund policy" popup: centred white rounded card, close ✕, scrollable body,
 * dark blurred backdrop. Self-contained (token vars have safe fallbacks). */

body.policy-open { overflow: hidden; }

/* border-box on everything inside the modal so padding never pushes width past the viewport */
.policy-modal, .policy-modal *, .policy-modal *::before, .policy-modal *::after { box-sizing: border-box; }

.policy-modal {
  position: fixed; inset: 0; z-index: 999999;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(20, 23, 26, .62); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  opacity: 0; transition: opacity .2s ease;
  font-family: var(--base-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
}
.policy-modal.is-open { opacity: 1; }

.policy-modal__card {
  position: relative; width: 100%; max-width: 640px; max-height: 86vh; min-width: 0;
  display: flex; flex-direction: column;
  background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
  transform: translateY(16px) scale(.985); transition: transform .22s ease;
}
.policy-modal.is-open .policy-modal__card { transform: none; }

.policy-modal__head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 24px; border-bottom: 1px solid #ececec; flex: 0 0 auto;
}
.policy-modal__title {
  margin: 0; font-size: 19px; font-weight: 700; line-height: 1.2;
  color: var(--qure-charcoal, #22262a);
}
.policy-modal__close {
  background: none; border: 0; cursor: pointer; padding: 4px; margin: -4px -4px -4px 0;
  color: #9a9c9e; font-size: 26px; line-height: 1; flex: 0 0 auto;
}
.policy-modal__close:hover { color: var(--qure-charcoal, #22262a); }

.policy-modal__body {
  overflow-y: auto; -webkit-overflow-scrolling: touch; overflow-wrap: anywhere; word-break: break-word; min-width: 0;
  padding: 22px 24px 26px; color: #3a3d40; font-size: 14px; line-height: 1.6;
  font-family: var(--base-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
}
.policy-modal__body h4 {
  margin: 22px 0 8px; font-size: 15.5px; font-weight: 700; color: var(--qure-charcoal, #22262a); line-height: 1.3;
}
.policy-modal__body h4:first-child { margin-top: 0; }
.policy-modal__body h5 {
  margin: 16px 0 6px; font-size: 14px; font-weight: 700; color: var(--qure-charcoal, #22262a);
}
.policy-modal__body p { margin: 0 0 12px; }
.policy-modal__body ul { margin: 0 0 14px; padding-left: 20px; }
.policy-modal__body li { margin: 0 0 7px; }
.policy-modal__body a { color: #1f6fb2; text-decoration: underline; word-break: break-word; }
.policy-modal__body strong, .policy-modal__body b { font-weight: 700; color: var(--qure-charcoal, #22262a); }
.policy-modal__body .policy-loading { color: #9a9c9e; text-align: center; padding: 30px 0; }

@media (max-width: 560px) {
  .policy-modal { padding: 0; align-items: flex-end; }
  .policy-modal__card { max-width: none; max-height: 92vh; border-radius: 16px 16px 0 0; }
  .policy-modal__head { padding: 16px 18px; }
  .policy-modal__title { font-size: 17px; }
  .policy-modal__body { padding: 18px 18px 22px; }
}
