/* ==========================================================================
   Dropify - Buy Now flow (v2.5.0)
   Product page -> Buy Now -> Customer -> Country -> Pricing / profit -> Review -> Create order
   Scoped to .dfy-bn / .dfy-bn-btn and written to out-rank theme + Elementor-kit styles.
   Phones: the dialog is a full-height sheet, fields are 16px (no iOS zoom), 48px tap targets.
   ========================================================================== */

/* ---- the prominent Buy Now button on the product page ---- */
.dfy-bn-btn-wrap { margin: 16px 0; width: 100%; max-width: 100%; box-sizing: border-box; clear: both; }
a.dfy-bn-btn, button.dfy-bn-btn {
  display: flex !important; align-items: center; justify-content: center; gap: 10px; width: 100%; max-width: 100%; box-sizing: border-box; min-height: 58px; padding: 16px 24px !important;
  border: 0 !important; border-radius: 14px !important; background: linear-gradient(135deg, #0A7D5A, #075C46) !important; color: #fff !important;
  font-family: inherit; font-size: 18px !important; font-weight: 800 !important; line-height: 1.2; letter-spacing: .01em; text-decoration: none !important; text-transform: none; cursor: pointer;
  box-shadow: 0 12px 26px rgba(10,125,90,.3); transition: transform .2s ease, box-shadow .2s ease;
}
a.dfy-bn-btn:hover, button.dfy-bn-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(10,125,90,.36); color: #fff !important; }
.dfy-bn-btn small { display: block; font-size: 12px; font-weight: 600; opacity: .9; }
.dfy-bn-btn-note { margin: 8px 0 0; font-size: 12.5px; text-align: center; color: #5B6B64; }

/* ---- dialog ---- */
.dfy-bn { position: fixed; inset: 0; z-index: 2147483000; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(10,20,16,.62); font-family: var(--dropify-font-family, 'Manrope', system-ui, sans-serif); color: #12231D; line-height: 1.5; -webkit-text-size-adjust: 100%; }
.dfy-bn.is-open { display: flex; }
.dfy-bn *, .dfy-bn *::before, .dfy-bn *::after { box-sizing: border-box; }
.dfy-bn .dfy-bn-dialog { position: relative; display: flex; flex-direction: column; width: 100%; max-width: 640px; max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); background: #fff; border-radius: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.35); overflow: hidden; }

.dfy-bn .dfy-bn-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid #E2EBE6; background: #F4FAF7; }
.dfy-bn .dfy-bn-thumb { flex: none; width: 52px; height: 52px; border-radius: 12px; background: #E2EBE6 center/cover no-repeat; }
.dfy-bn .dfy-bn-head-text { flex: 1; min-width: 0; }
.dfy-bn .dfy-bn-kicker { display: block; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #0A7D5A; }
.dfy-bn .dfy-bn-title { display: block; margin: 0; font-size: 16px; font-weight: 800; line-height: 1.3; color: #12231D !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dfy-bn .dfy-bn-close { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0 !important; border: 1px solid #E2EBE6 !important; border-radius: 12px !important; background: #fff !important; color: #12231D !important; font-size: 22px !important; line-height: 1; cursor: pointer; box-shadow: none; }

.dfy-bn .dfy-bn-steps { display: flex; gap: 6px; margin: 0; padding: 12px 20px; list-style: none; border-bottom: 1px solid #E2EBE6; }
.dfy-bn .dfy-bn-steps li { flex: 1; min-width: 0; margin: 0; padding: 0; list-style: none; text-align: center; font-size: 11.5px; font-weight: 700; color: #8C9B94; }
.dfy-bn .dfy-bn-steps li::before { content: ""; display: block; height: 4px; margin-bottom: 6px; border-radius: 4px; background: #E2EBE6; transition: background-color .2s ease; }
.dfy-bn .dfy-bn-steps li.is-done::before, .dfy-bn .dfy-bn-steps li.is-active::before { background: #0A7D5A; }
.dfy-bn .dfy-bn-steps li.is-active { color: #0A7D5A; }
.dfy-bn .dfy-bn-steps li.is-done { color: #12231D; }

.dfy-bn .dfy-bn-body { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 20px; }
.dfy-bn .dfy-bn-step { display: none; }
.dfy-bn .dfy-bn-step.is-active { display: block; }
.dfy-bn .dfy-bn-h { margin: 0 0 4px; font-family: inherit !important; font-size: 18px !important; font-weight: 800 !important; line-height: 1.3; letter-spacing: 0; text-transform: none !important; color: #12231D !important; }
.dfy-bn .dfy-bn-sub { margin: 0 0 18px; font-size: 13.5px; color: #5B6B64; }

.dfy-bn .dfy-bn-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.dfy-bn .dfy-bn-field { min-width: 0; margin: 0; }
.dfy-bn .dfy-bn-field.is-full { grid-column: 1 / -1; }
.dfy-bn .dfy-bn-field label { display: block; margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: #12231D; }
.dfy-bn .dfy-bn-field label em { font-style: normal; font-weight: 600; text-transform: none; letter-spacing: 0; color: #8C9B94; }
.dfy-bn .dfy-bn-input {
  display: block; width: 100% !important; max-width: 100% !important; min-height: 48px; margin: 0 !important; padding: 12px 14px !important;
  border: 1px solid #CFDAD4 !important; border-radius: 12px !important; background: #fff !important; color: #12231D !important;
  font-family: inherit !important; font-size: 16px !important; line-height: 1.4 !important; box-shadow: none !important; -webkit-appearance: none; appearance: none;
}
.dfy-bn textarea.dfy-bn-input { min-height: 84px; resize: vertical; }
.dfy-bn .dfy-bn-input:focus { outline: 2px solid rgba(10,125,90,.3) !important; outline-offset: 0 !important; border-color: #0A7D5A !important; }
.dfy-bn .dfy-bn-input.is-invalid { border-color: #D64545 !important; background: #FFF8F8 !important; }
.dfy-bn .dfy-bn-err { display: none; margin: 14px 0 0; padding: 11px 14px; border: 1px solid #F8B4B4; border-radius: 10px; background: #FDE8E8; color: #9B1C1C; font-size: 13.5px; font-weight: 600; }
.dfy-bn .dfy-bn-err.is-shown { display: block; }

/* country cards */
.dfy-bn .dfy-bn-countries { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.dfy-bn .dfy-bn-country { position: relative; display: block; margin: 0; padding: 16px 14px; border: 2px solid #E2EBE6; border-radius: 14px; background: #fff; text-align: center; cursor: pointer; transition: border-color .2s ease, background-color .2s ease; }
.dfy-bn .dfy-bn-country input { position: absolute; opacity: 0; pointer-events: none; }
.dfy-bn .dfy-bn-country.is-selected { border-color: #0A7D5A; background: #F1FAF5; }
.dfy-bn .dfy-bn-country.is-selected::after { content: "✓"; position: absolute; top: 8px; right: 10px; width: 22px; height: 22px; border-radius: 50%; background: #0A7D5A; color: #fff; font-size: 12px; font-weight: 800; line-height: 22px; }
.dfy-bn .dfy-bn-flag { display: block; font-size: 30px; line-height: 1.2; }
.dfy-bn .dfy-bn-cname { display: block; margin-top: 4px; font-size: 15px; font-weight: 800; }
.dfy-bn .dfy-bn-cmeta { display: block; margin-top: 2px; font-size: 12.5px; color: #5B6B64; }
.dfy-bn .dfy-bn-note { margin: 14px 0 0; padding: 11px 14px; border-radius: 10px; background: #F4FAF7; font-size: 13px; color: #075C46; }

/* pricing */
.dfy-bn .dfy-bn-costs { margin: 0 0 16px; padding: 14px 16px; border: 1px solid #E2EBE6; border-radius: 14px; background: #FAFCFB; }
.dfy-bn .dfy-bn-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 14.5px; }
.dfy-bn .dfy-bn-row span { color: #5B6B64; }
.dfy-bn .dfy-bn-row b { font-weight: 700; text-align: right; white-space: nowrap; }
.dfy-bn .dfy-bn-row.is-total { margin-top: 6px; padding-top: 10px; border-top: 1px dashed #CFDAD4; font-size: 15.5px; }
.dfy-bn .dfy-bn-row.is-total span, .dfy-bn .dfy-bn-row.is-total b { color: #12231D; font-weight: 800; }
.dfy-bn .dfy-bn-money { display: flex; align-items: stretch; }
.dfy-bn .dfy-bn-money > span { display: inline-flex; align-items: center; padding: 0 12px; border: 1px solid #CFDAD4; border-right: 0; border-radius: 12px 0 0 12px; background: #F4FAF7; font-size: 14px; font-weight: 800; color: #5B6B64; white-space: nowrap; }
.dfy-bn .dfy-bn-money .dfy-bn-input { border-radius: 0 12px 12px 0 !important; font-size: 18px !important; font-weight: 800 !important; }
.dfy-bn .dfy-bn-profit { margin-top: 16px; padding: 16px; border: 2px solid #0A7D5A; border-radius: 14px; background: #F1FAF5; }
.dfy-bn .dfy-bn-profit.is-negative { border-color: #D64545; background: #FFF5F5; }
.dfy-bn .dfy-bn-profit .dfy-bn-row b { font-size: 16px; }
.dfy-bn .dfy-bn-profit .dfy-bn-big { font-size: 22px; font-weight: 800; color: #0A7D5A; }
.dfy-bn .dfy-bn-profit.is-negative .dfy-bn-big { color: #D64545; }
.dfy-bn .dfy-bn-hint { margin: 6px 0 0; font-size: 12.5px; color: #5B6B64; }

/* review */
.dfy-bn .dfy-bn-review { margin: 0 0 14px; padding: 14px 16px; border: 1px solid #E2EBE6; border-radius: 14px; }
.dfy-bn .dfy-bn-review h4 { margin: 0 0 8px; font-family: inherit !important; font-size: 12px !important; font-weight: 800 !important; letter-spacing: .06em; text-transform: uppercase !important; color: #0A7D5A !important; }
.dfy-bn .dfy-bn-review .dfy-bn-row b { white-space: normal; overflow-wrap: anywhere; }

/* success */
.dfy-bn .dfy-bn-done { padding: 22px 6px; text-align: center; }
.dfy-bn .dfy-bn-done .dfy-bn-tick { display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 72px; margin-bottom: 14px; border-radius: 50%; background: #0A7D5A; color: #fff; font-size: 34px; font-weight: 800; }

/* footer buttons */
.dfy-bn .dfy-bn-foot { display: flex; gap: 10px; padding: 14px 20px calc(14px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid #E2EBE6; background: #fff; }
.dfy-bn .dfy-bn-action {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex: 1; min-height: 50px; padding: 12px 18px !important;
  border: 2px solid #0A7D5A !important; border-radius: 12px !important; background: #0A7D5A !important; color: #fff !important;
  font-family: inherit !important; font-size: 15.5px !important; font-weight: 800 !important; line-height: 1.2 !important; text-decoration: none !important; text-transform: none !important; letter-spacing: 0; cursor: pointer; box-shadow: none !important;
}
.dfy-bn .dfy-bn-action:hover { background: #075C46 !important; border-color: #075C46 !important; color: #fff !important; }
.dfy-bn .dfy-bn-action.is-ghost { flex: 0 0 auto; min-width: 96px; background: #fff !important; color: #0A7D5A !important; }
.dfy-bn .dfy-bn-action.is-ghost:hover { background: #F1FAF5 !important; color: #0A7D5A !important; }
.dfy-bn .dfy-bn-action[disabled] { opacity: .6; cursor: not-allowed; }
.dfy-bn .dfy-bn-loading { padding: 40px 10px; text-align: center; color: #5B6B64; font-size: 14px; }
html.dfy-bn-lock { overflow: hidden; }

/* ---- phones: full-height sheet ---- */
@media (max-width: 640px) {
  .dfy-bn { padding: 0; align-items: flex-end; }
  .dfy-bn .dfy-bn-dialog { max-width: none; height: 100%; max-height: 100vh; max-height: 100dvh; border-radius: 0; }
  .dfy-bn .dfy-bn-head { padding: 12px 14px; }
  .dfy-bn .dfy-bn-thumb { width: 44px; height: 44px; }
  .dfy-bn .dfy-bn-steps { padding: 10px 14px; }
  .dfy-bn .dfy-bn-steps li { font-size: 10.5px; }
  .dfy-bn .dfy-bn-body { padding: 16px 14px; }
  .dfy-bn .dfy-bn-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .dfy-bn .dfy-bn-countries { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
  .dfy-bn .dfy-bn-foot { padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px)); }
  a.dfy-bn-btn, button.dfy-bn-btn { min-height: 56px; font-size: 17px !important; }
}
@media (prefers-reduced-motion: reduce) { a.dfy-bn-btn, button.dfy-bn-btn { transition: none; } }
