/* Load after euro-flow.css and order-popup.css. The surrounding public dialog owns its width. */
.ef-surface {
  --ef-payment-ink: #1e293b;
  --ef-payment-text: #475569;
  --ef-payment-muted: #59677a;
  --ef-payment-line: #dce1eb;
  --ef-payment-accent: #4f46cf;
  --ef-payment-tint: #f4f2ff;
}

.workspace .ef-surface:has(:is(.ef-checkout-table, .ef-managed-bill, .ef-billing-controls, .ef-locked-breakdown)) {
  inline-size: 100%;
  max-inline-size: 712px;
  margin-inline: auto;
}

.ef-surface .ef-card:has(:is(.ef-checkout-table, .ef-managed-bill, .ef-billing-controls, .ef-locked-breakdown)) {
  font-size: 13px;
  line-height: 1.5;
}

.ef-surface .ef-card:has(:is(.ef-checkout-table, .ef-managed-bill, .ef-billing-controls, .ef-locked-breakdown)) > h2 {
  margin-block: 0 6px;
  color: var(--ef-payment-ink);
  font-size: 20px;
  line-height: 1.5;
  font-weight: 700;
}

.ef-surface .ef-card:has(:is(.ef-checkout-table, .ef-managed-bill, .ef-billing-controls, .ef-locked-breakdown)) > .ef-lead {
  margin-block: 0 20px;
  font-size: 13px;
  line-height: 1.5;
}

@media (min-width: 768px) {
  .workspace .ef-surface .ef-card:has(:is(.ef-checkout-table, .ef-managed-bill, .ef-billing-controls, .ef-locked-breakdown)) {
    padding: 28px;
  }
}

.ef-surface :is(.ef-checkout-table, .ef-managed-bill, .ef-locked-breakdown) {
  display: block;
  min-inline-size: 0;
  margin: 0;
  padding: 16px 18px;
  border: 1px solid #dcdaf2;
  border-radius: 14px;
  background: linear-gradient(180deg, #f7f6fd, #fcfbff);
  color: var(--ef-payment-text);
}

.ef-surface :is(.ef-checkout-table, .ef-managed-bill, .ef-locked-breakdown) > dl {
  margin: 0;
}

.ef-surface :is(.ef-checkout-row, .ef-checkout-total) {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-inline-size: 0;
  margin: 0;
  text-align: start;
}

.ef-surface .ef-checkout-row {
  padding-block: 8px;
  border-block-end: 1px dashed var(--ef-payment-line);
  color: var(--ef-payment-text);
  font-size: 13px;
  line-height: 1.5;
}

.ef-surface .ef-checkout-row:last-child,
.ef-surface .ef-checkout-row:has(+ .ef-checkout-total) {
  border-block-end: 0;
}

.ef-surface :is(.ef-checkout-row, .ef-checkout-total) > :first-child {
  min-inline-size: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.ef-surface :is(.ef-checkout-row, .ef-checkout-total) > :last-child:not(:only-child) {
  min-inline-size: 0;
  max-inline-size: 62%;
  margin: 0;
  color: var(--ef-payment-ink);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  text-align: end;
  overflow-wrap: anywhere;
  unicode-bidi: isolate;
}

.ef-surface .ef-checkout-total {
  margin-block-start: 6px;
  padding-block-start: 14px;
  border-block-start: 2px solid #283246;
  color: var(--ef-payment-ink);
  font-size: 15px;
  line-height: 1.4;
  font-weight: 700;
}

.ef-surface .ef-checkout-total > :last-child:not(:only-child) {
  color: var(--ef-payment-accent);
  font-size: 22px;
  line-height: 1.25;
  font-weight: 700;
}

.ef-surface :is(.ef-checkout-table, .ef-managed-bill, .ef-locked-breakdown) bdi {
  unicode-bidi: isolate;
}

.ef-surface :is(.ef-checkout-notice, .ef-checkout-agree, .ef-billing-consent, .ef-payment-error) {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-inline-size: 0;
  margin: 0;
  color: var(--ef-payment-text);
  font-size: 12px;
  line-height: 1.5;
  font-weight: 400;
}

.ef-surface :is(.ef-checkout-notice, .ef-checkout-agree, .ef-payment-error) {
  padding: 12px 14px;
  border: 1px solid var(--ef-payment-line);
  border-radius: 10px;
}

.ef-surface .ef-checkout-notice {
  border-color: #cddcf4;
  background: #f1f6ff;
  color: #234583;
}

.ef-surface .ef-checkout-agree {
  min-block-size: 44px;
  background: #f8fafc;
}

.ef-surface label.ef-checkout-agree,
.ef-surface label.ef-billing-consent {
  cursor: pointer;
}

.ef-surface :is(.ef-checkout-agree, .ef-billing-consent) input[type="checkbox"] {
  flex: 0 0 16px;
  inline-size: 16px;
  block-size: 16px;
  margin: 1px 0 0;
  accent-color: var(--ef-payment-accent);
  cursor: pointer;
}

.ef-surface :is(.ef-checkout-notice, .ef-checkout-agree, .ef-billing-consent, .ef-payment-error) > svg {
  flex: 0 0 16px;
  inline-size: 16px;
  block-size: 16px;
  margin-block-start: 1px;
}

.ef-surface :is(.ef-checkout-notice, .ef-checkout-agree, .ef-billing-consent, .ef-payment-error) :where(p, div) {
  margin-block: 0;
  font: inherit;
  color: inherit;
}

.ef-surface :is(.ef-checkout-agree, .ef-checkout-notice, .ef-billing-consent, .ef-bill-foot, .ef-payment-error) a {
  color: var(--ef-payment-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
}

.ef-surface .ef-checkout-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  margin-block: 0;
  padding: 15px 0 0;
  border-block-start: 1px solid var(--ef-payment-line);
  color: var(--ef-payment-text);
  font-size: 12px;
  line-height: 1.5;
  list-style: none;
}

.ef-surface .ef-checkout-trust > * {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-inline-size: 0;
  font-weight: 600;
}

.ef-surface .ef-checkout-trust svg {
  flex: 0 0 15px;
  inline-size: 15px;
  block-size: 15px;
  color: #15805c;
}

.ef-surface .ef-billing-controls {
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.ef-surface .ef-billing-controls > :is(legend, .ef-field-label) {
  margin: 0 0 8px;
  padding: 0;
  color: var(--ef-payment-ink);
  font-size: 13px;
  font-weight: 600;
}

.ef-surface :is(.ef-billing-controls .ef-presets, .ef-billing-controls.ef-presets, .ef-billing-controls:has(> button)) {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: 8px;
  padding-block-start: 4px;
}

.ef-surface .ef-billing-controls:has(> button) > :not(button) {
  grid-column: 1 / -1;
}

.ef-surface .ef-billing-controls button {
  position: relative;
  display: grid;
  place-items: center;
  min-inline-size: 0;
  min-block-size: 48px;
  padding: 12px 6px;
  border: 1.5px solid var(--ef-payment-line);
  border-radius: 12px;
  background: #fff;
  color: var(--ef-payment-ink);
  font: inherit;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
}

.ef-surface .ef-billing-controls button strong {
  font-size: inherit;
  font-weight: inherit;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.ef-surface .ef-billing-controls button[aria-pressed="true"] {
  border-color: var(--ef-payment-accent);
  background: var(--ef-payment-tint);
  color: #4537a5;
  box-shadow: 0 0 0 3px #6651cf1b;
}

.ef-surface .ef-billing-controls button :is(small, .ef-billing-badge) {
  position: absolute;
  inset-block-start: -9px;
  left: 50%;
  transform: translateX(-50%);
  inline-size: max-content;
  max-inline-size: calc(100% - 6px);
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--ef-payment-accent);
  color: white;
  font-size: 10px;
  line-height: 1.3;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  overflow-wrap: normal;
}

.ef-surface .ef-billing-custom:not(input) {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  gap: 6px 10px;
  margin-block: 6px 0;
}

.ef-surface .ef-billing-custom :is(label, span),
.ef-surface label.ef-billing-custom {
  color: var(--ef-payment-text);
  font-size: 12px;
  line-height: 1.5;
  font-weight: 400;
}

.ef-surface .ef-billing-custom > :is(label, span) {
  margin: 0;
}

.ef-surface :is(.ef-billing-custom input, input.ef-billing-custom) {
  flex: 0 1 180px;
  inline-size: 180px;
  max-inline-size: 100%;
  min-inline-size: 0;
  min-block-size: 44px;
  padding: 9px 12px;
  border: 1px solid var(--ef-payment-line);
  border-radius: 10px;
  background: #fff;
  color: var(--ef-payment-ink);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  text-align: start;
}

.ef-surface .ef-managed-bill {
  padding: 14px 16px;
}

.ef-surface .ef-managed-bill .ef-checkout-row {
  align-items: center;
  padding-block: 7px;
  border: 0;
}

.ef-surface .ef-managed-bill .ef-checkout-row > :first-child {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ef-surface .ef-managed-bill .ef-checkout-row svg,
.ef-surface .ef-bill-foot > svg {
  flex: 0 0 16px;
  inline-size: 16px;
  block-size: 16px;
  color: var(--ef-payment-accent);
}

.ef-surface .ef-managed-bill .ef-checkout-total {
  padding-block-start: 12px;
  border-block-start: 1.5px solid #cbd0dc;
}

.ef-surface .ef-bill-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  min-inline-size: 0;
  margin: 10px 0 0;
  color: var(--ef-payment-muted);
  font-size: 12px;
  line-height: 1.5;
}

.ef-surface .ef-bill-foot:has(:is(button, .ef-btn)) {
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
}

.ef-surface .ef-billing-auth {
  min-inline-size: 0;
  margin: 0;
}

.ef-surface .ef-billing-auth:is(.ef-auth),
.ef-surface .ef-billing-auth:not(:has(.ef-auth)):has(button, a[href]) {
  display: grid;
  gap: 9px;
  padding: 15px;
  border: 1px solid #d9e1f3;
  border-radius: 13px;
  background: #f6f8fe;
}

.ef-surface .ef-billing-consent {
  color: var(--ef-payment-muted);
}

.ef-surface p.ef-billing-consent {
  display: block;
  overflow-wrap: anywhere;
}

.ef-surface .ef-billing-consent > svg {
  color: #65738b;
}

.ef-surface .ef-billing-target {
  display: flex;
  align-items: center;
  gap: 11px;
  min-inline-size: 0;
  padding: 11px 13px;
  border: 1px solid var(--ef-payment-line);
  border-radius: 12px;
  background: #fff;
}

.ef-surface .ef-billing-target > svg {
  box-sizing: border-box;
  flex: 0 0 40px;
  inline-size: 40px;
  block-size: 40px;
  padding: 10px;
  border-radius: 50%;
  background: #e8f1fb;
  color: #295484;
}

.ef-surface .ef-billing-target > span {
  display: grid;
  gap: 2px;
  min-inline-size: 0;
}

.ef-surface .ef-billing-target small {
  color: var(--ef-payment-muted);
  font-size: 12px;
  line-height: 1.45;
}

.ef-surface .ef-billing-target strong {
  color: var(--ef-payment-ink);
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.ef-surface .ef-checkout-back,
.ef-surface .ef-btn.ef-checkout-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-block-size: 44px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--ef-payment-text);
  font: inherit;
  font-weight: 600;
  text-align: start;
  text-decoration: none;
  cursor: pointer;
}

[dir="rtl"] .ef-surface .ef-checkout-back > .ef-line-icon {
  transform: scaleX(-1);
}

.ef-surface .ef-payment-error {
  border-color: #f1c5c9;
  background: #fff3f4;
  color: #982c3c;
}

.ef-surface .ef-card:has(:is(.ef-checkout-table, .ef-managed-bill, .ef-locked-breakdown)) p[role="alert"]:not([hidden]):not(:empty) {
  padding: 12px 14px;
  margin: 0;
  border: 1px solid #f1c5c9;
  border-radius: 10px;
  background: #fff3f4;
  color: #982c3c;
  font-size: 12px;
  line-height: 1.5;
}

.ef-surface .ef-payment-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.ef-surface .ef-payment-status:not(:has(> :not([hidden]))) {
  display: none;
}

.ef-surface .ef-payment-status [role="status"] {
  margin: 0;
  color: var(--ef-payment-text);
  font-size: 12px;
  line-height: 1.5;
}

.ef-surface :is(.ef-billing-auth, .ef-managed-bill, .ef-payment-error, .ef-locked-breakdown):empty {
  display: none;
}

.ef-surface .ef-locked-breakdown {
  padding: 12px 16px;
  border-color: var(--ef-payment-line);
  background: #fff;
}

.ef-surface .ef-locked-breakdown :is(.ef-checkout-table, .ef-managed-bill) {
  padding: 0;
  border: 0;
  background: transparent;
}

.ef-surface .ef-locked-breakdown .ef-checkout-row {
  padding-block: 5px;
  border: 0;
}

.ef-surface .ef-locked-breakdown .ef-checkout-total {
  margin-block-start: 4px;
  padding-block-start: 10px;
  border-block-start: 1px solid var(--ef-payment-line);
  font-size: 14px;
}

.ef-surface .ef-locked-breakdown .ef-checkout-total > :last-child:not(:only-child) {
  font-size: 18px;
}

.ef-surface .ef-locked-breakdown:is([data-payment-state="confirmed"], [data-payment-state="ready"]) .ef-checkout-total > :last-child:not(:only-child) {
  color: #087456;
}

.ef-surface .ef-receipt > :is(.ef-checkout-table, .ef-managed-bill, .ef-locked-breakdown, .ef-checkout-notice) {
  margin-block-end: 14px;
}

.ef-surface .ef-receipt > .ef-actions {
  margin-block-start: 16px;
}

.ef-surface .ef-receipt .ef-btn[data-invoice-ready="true"] {
  color: #fff;
  background: linear-gradient(135deg, #0a8062, #087052);
  box-shadow: 0 4px 12px -5px #08745688;
}

.ef-surface :is(.ef-billing-controls, .ef-billing-custom, .ef-billing-auth, .ef-checkout-agree, .ef-billing-consent, .ef-bill-foot) :is(a, button, input):focus-visible,
.ef-surface .ef-checkout-back:focus-visible {
  outline: 2px solid var(--ef-payment-accent);
  outline-offset: 3px;
}

.ef-surface label.ef-checkout-agree:has(input:focus-visible) {
  border-color: var(--ef-payment-accent);
}

.ef-surface .ef-billing-controls button:disabled,
.ef-surface .ef-checkout-back:disabled {
  cursor: not-allowed;
  opacity: .55;
}

@media (hover: hover) {
  .ef-surface .ef-billing-controls button:enabled:hover {
    border-color: var(--ef-payment-accent);
    background: var(--ef-payment-tint);
  }

  .ef-surface .ef-checkout-back:not(:disabled):hover {
    background: #f1f3f9;
    color: var(--ef-payment-ink);
  }

  .ef-surface :is(.ef-checkout-agree, .ef-checkout-notice, .ef-billing-consent, .ef-bill-foot) a:hover {
    color: #3e319f;
  }
}

@media (max-width: 560px) {
  .ef-surface :is(.ef-billing-controls .ef-presets, .ef-billing-controls.ef-presets, .ef-billing-controls:has(> button)) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 13px;
  }

  .ef-surface :is(.ef-billing-custom input, input.ef-billing-custom) {
    font-size: 16px;
  }

  .ef-surface :is(.ef-checkout-table, .ef-managed-bill, .ef-locked-breakdown) {
    padding-inline: 13px;
  }
}

@media (max-width: 420px) {
  .ef-surface .ef-bill-foot:has(:is(button, .ef-btn)) > :is(button, .ef-btn) {
    flex: 1 1 100%;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .ef-surface .ef-billing-controls button,
  .ef-surface .ef-checkout-back {
    transition: background-color .14s ease, border-color .14s ease, box-shadow .14s ease;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ef-surface :is(.ef-checkout-back, .ef-billing-controls button, .ef-bill-foot .ef-btn, .ef-billing-auth .ef-btn) {
    transition: none !important;
    animation: none !important;
  }
}
.ef-surface .ef-niche-field { display:grid; gap:8px; }
.ef-surface .ef-risk {
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:7px 12px; min-height:34px; border:1px solid #d2d9e3; border-radius:8px;
  background:#f4f5f7; color:#475569; font-size:12px;
}
.ef-risk span { display:inline-flex; align-items:center; gap:8px; }
.ef-risk span::before { content:""; width:8px; height:8px; flex:none; border-radius:50%; background:currentColor; }
.ef-surface .ef-risk[data-risk=low] { color:#147454; background:#f1faf6; border-color:#c9e9d9; }
.ef-surface .ef-risk[data-risk=high] { color:#9a4813; background:#fff7ed; border-color:#f5d8b5; }
.ef-surface .ef-risk[hidden], .ef-surface [data-auto-note][hidden] { display:none; }
.ef-surface .ef-progress li.done { color:#008e67; background:white; border-color:var(--ef-border); }
.ef-surface .ef-estimate {
  background:linear-gradient(130deg,#f6f6ff,#faf9ff); border:1px solid #d8d8ff;
  border-radius:12px; padding:15px 16px; color:#475569;
}
.ef-estimate h3 { display:flex; align-items:center; gap:6px; margin:0 0 9px; color:#69799a; font:700 11px/1.4 Inter,sans-serif; text-transform:uppercase; letter-spacing:.055em; }
.ef-estimate h3 svg { width:14px; height:14px; color:#6866ed; }
.ef-estimate .ef-line { display:flex; justify-content:space-between; gap:12px; padding:2px 0; font-size:13px; line-height:1.5; }
.ef-estimate .ef-line strong { text-align:end; color:#1e293b; font-weight:600; font-variant-numeric:tabular-nums; }
.ef-estimate .ef-estimate-total { border-block-start:1px dashed #cfcffd; margin-block-start:9px; padding-block:10px 4px; align-items:center; color:#1e293b; font-weight:700; }
.ef-estimate .ef-estimate-total strong { color:#5549e6; font-size:19px; }
.ef-estimate > small { display:block; color:#66748b; margin-block-start:5px; font-size:11px; }
.ef-surface form[data-network=telegram] .ef-auth { padding:17px; border:1px solid #d8d8ff; border-radius:12px; background:linear-gradient(125deg,#f6f6ff,#faf9ff); }
.ef-surface form[data-network=telegram] .ef-auth h3 { color:#1e293b; font-size:14px; margin:0; }
.ef-surface form[data-network=telegram] .ef-auth p { margin:6px 0 14px; }
.ef-surface form[data-network=telegram] .ef-auth-actions { display:grid; gap:9px; }
.ef-surface form[data-network=telegram] .ef-auth-actions .ef-btn { width:100%; min-height:48px; border-radius:10px; }
.ef-surface form[data-network=telegram] .ef-auth-actions [data-ef=bot] { background:linear-gradient(110deg,#1b9ed6,#1b8cbf); color:white; }
.ef-surface form[data-network=telegram] .ef-auth-actions [data-ef=bot] svg { color:white; }
.ef-surface form[data-network=telegram] .ef-auth-actions [data-ef=register] { color:#087bb3; background:white; border:1px solid #b7dcf2; box-shadow:none; }
.ef-surface form[data-network=telegram] .ef-auth-actions svg { width:17px; height:17px; }
.ef-surface form[data-network=telegram] .ef-auth .ef-alt-login { margin-block-start:8px; font-size:12px; }
.ef-surface [data-network=telegram] .ef-billing-custom + .ef-form-hint { display:block; margin-block-start:6px; }
.ef-surface form[data-network=telegram] .ef-billing-controls button small { text-transform:uppercase; }
.ef-surface form[data-network=telegram] .ef-suggestion { display:flex; align-items:center; flex-wrap:wrap; gap:6px 14px; margin:0; padding:0; border:0; background:none; }
.ef-surface form[data-network=telegram] .ef-suggestion[hidden] { display:none; }
.ef-surface form[data-network=telegram] .ef-suggestion p { display:none; }
.ef-surface form[data-network=telegram] .ef-suggestion .ef-btn { min-height:30px; padding:3px 9px; font-size:12px; }
