/* «Купить в 1 клик»: form inside the modal window (tokens and the window itself — suntc-dialog.css). */
#suntc-quick-order { padding: 0 24px 24px; }
#suntc-quick-form > p { margin: 0 0 var(--s-4); color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.suntc-quick-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); margin: 0 0 var(--s-4); }

/* Product summary (from the product page) */
.suntc-quick-product { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: var(--s-3); align-items: center; margin: 0 0 var(--s-4); padding: var(--s-3); border-radius: var(--r-card); background: var(--surface); }
.suntc-quick-product:not(:has(img)) { grid-template-columns: minmax(0, 1fr) auto; }
.suntc-quick-product img { width: 64px; height: 64px; object-fit: contain; border-radius: var(--r-ctl); background: #fff; }
.suntc-quick-product b { display: block; font-size: 15px; font-weight: 500; line-height: 1.35; overflow-wrap: anywhere; }
.suntc-quick-product span { display: block; margin-top: 2px; color: var(--ink-2); font-size: 13px; line-height: 1.4; }
.suntc-quick-product .suntc-quick-stock { color: var(--error-text); }
.suntc-quick-product strong { font-size: 17px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Captcha rebuilt by quick-order.js: label, field and picture of one height */
#suntc-quick-form .suntc-captcha { margin: 0 0 var(--s-4); }
#suntc-quick-form .suntc-captcha-row { display: flex; gap: var(--s-2); align-items: stretch; margin-top: 6px; }
#suntc-quick-form .suntc-captcha-row input { flex: 1; min-width: 0; margin: 0 !important; }
#suntc-quick-form .suntc-captcha-pic { flex: 0 0 150px; display: grid; place-items: center; height: var(--h-ctl); border: 1px solid var(--control); border-radius: var(--r-ctl); background: #fff; overflow: hidden; }
/* the picture has its own 1px frame: crop it so only the field frame remains */
#suntc-quick-form .suntc-captcha-pic img { display: block; width: auto !important; max-width: 140px; height: 32px; margin: 0; border: 0; clip-path: inset(1px); }
#suntc-quick-form .suntc-captcha + .suntc-quick-error { margin: calc(-1 * var(--s-3)) 0 var(--s-4); }

/* Consents */
#suntc-quick-form .suntc-order-check { display: grid; grid-template-columns: 20px minmax(0, 1fr); column-gap: var(--s-3); row-gap: 2px; align-items: start; margin: 0 0 var(--s-3); font-size: 14px; line-height: 1.4; }
#suntc-quick-form .suntc-order-check label { margin: 0; font-size: 14px; cursor: pointer; }
#suntc-quick-form .suntc-order-check a { color: var(--ink); text-decoration: underline; text-decoration-color: #c98a12; text-underline-offset: 3px; }
#suntc-quick-form .suntc-order-check .suntc-quick-error { grid-column: 2; margin: 0; }
#suntc-quick-form button[type='submit'] { margin-top: var(--s-5); }

/* Status line above the form */
#suntc-quick-message { margin: 0 0 var(--s-4); font-size: 15px; overflow-wrap: anywhere; }
#suntc-quick-message[data-tone='error'], #suntc-quick-message[data-tone='success'] { padding: var(--s-3) var(--s-4); border-radius: var(--r-ctl); }
#suntc-quick-message[data-tone='error'] { background: var(--error-bg); color: var(--error-text); }
#suntc-quick-message[data-tone='success'] { background: var(--success-bg); color: var(--success); font-weight: 500; }
#suntc-quick-order [data-quick-retry] { margin-top: var(--s-3); }

@media (max-width: 480px) {
  #suntc-quick-order { padding: 0 16px max(20px, env(safe-area-inset-bottom)); }
  .suntc-quick-fields { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 380px) {
  .suntc-quick-product { grid-template-columns: 52px minmax(0, 1fr); }
  .suntc-quick-product img { width: 52px; height: 52px; }
  .suntc-quick-product strong { grid-column: 2; }
}

/* Product page: secondary button under «Купить», same height as the theme's main button */
#product .suntc-one-click-row, .suntc-one-click-row { display: flex; flex-direction: column; gap: var(--s-2); margin: var(--s-3) 0 var(--s-4); }
#product .suntc-one-click, .suntc-one-click-row .suntc-one-click {
  width: 100%; min-height: 54px; padding: 12px 20px; border: 2px solid #111; border-radius: 0;
  background: #fff; color: #111; opacity: 1;
  font: inherit; font-size: 14px; font-weight: 700; letter-spacing: .01em; cursor: pointer;
  transition: background-color var(--t-fast), color var(--t-fast);
}
@media (hover: hover) { #product .suntc-one-click:hover, .suntc-one-click-row .suntc-one-click:hover { background: #f1f1ec; color: #111; opacity: 1; } }
#product .suntc-one-click:focus-visible, .suntc-one-click-row .suntc-one-click:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.suntc-one-click-row span { color: var(--ink-2); font-size: 13px; line-height: 1.4; text-align: center; }
