/* "Подписка и экономия" on the product page: notes under the option and the sign-up window (product-subscription.js).
   Loaded only while the subscription switch is on. The option itself reuses the purchase-plan styles of product.css. */
.ngs-plan-note { margin: 0 0 12px; color: var(--ng-text-body, #333); font-size: 13px; line-height: 18px; }
.ngs-plan-note--warn { color: #b42318; font-weight: 700; }
/* "Повтор без скидки": the first order of a new subscription has no subscription discount (block and window). */
.ngs-repeat-note { margin: 0 0 12px; padding: 8px 10px; border-radius: 8px; background: #fff8e1; color: #5f4200; font-size: 13px; line-height: 18px; }
.ngs-repeat-note[hidden] { display: none; }
.ngs-plan .pdp-subscription-discount small[hidden] { display: none; }
.ngs-plan .pdp-subscribe-button:disabled { background: #e5e7e5; color: #555; cursor: default; }

.ngs-dialog { width: min(640px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: 16px; background: var(--ng-surface-white, #fff); color: var(--ng-text-body, #333); box-shadow: 0 16px 48px rgb(15 23 42 / 22%); font-family: var(--locale-font, 'NatGard Lato'), 'NatGard Noto Sans', Arial, Helvetica, sans-serif; }
.ngs-dialog::backdrop { background: rgb(15 23 42 / 45%); }
.ngs-sheet { display: flex; flex-direction: column; max-height: calc(100dvh - 32px); }
.ngs-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 12px; border-bottom: 1px solid var(--ng-border, #e6e8ea); }
.ngs-head h2 { margin: 0; font-size: 20px; line-height: 28px; color: var(--ng-text, #20252b); }
.ngs-close { width: 36px; height: 36px; flex: none; border: 0; border-radius: 50%; background: transparent; color: var(--ng-text, #20252b); font-size: 26px; line-height: 1; cursor: pointer; }
.ngs-close:hover { background: #f0f4f5; }
.ngs-body { overflow-y: auto; padding: 16px 20px 20px; font-size: 14px; line-height: 20px; }
.ngs-body p { margin: 0 0 12px; }
.ngs-muted { color: var(--ng-muted, #666); font-size: 13px; }
.ngs-product { display: flex; gap: 12px; align-items: center; margin: 0 0 16px; padding: 12px; border-radius: 12px; background: var(--ng-surface-soft, #f5f5f5); }
.ngs-product img { width: 72px; height: 72px; flex: none; object-fit: contain; border-radius: 8px; background: #fff; }
.ngs-product div { display: grid; gap: 2px; min-width: 0; }
.ngs-product strong { font-size: 15px; line-height: 20px; }
.ngs-product s { color: var(--ng-muted, #666); }
.ngs-form { display: grid; gap: 14px; }
.ngs-row, .ngs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.ngs-field { display: grid; gap: 4px; min-width: 0; font-size: 13px; color: var(--ng-text-body, #333); }
.ngs-field input, .ngs-field select { box-sizing: border-box; width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--ng-input-border, #8d8d8d); border-radius: 8px; background: #fff; color: inherit; font-family: inherit; font-size: 15px; line-height: 20px; }
.ngs-field input:focus-visible, .ngs-field select:focus-visible, .ngs-option input:focus-visible, .ngs-check input:focus-visible { outline: 2px solid var(--ng-focus, #35780e); outline-offset: 2px; }
.ngs-fieldset { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; }
.ngs-fieldset legend { margin: 0 0 6px; padding: 0; font-size: 16px; font-weight: 700; color: var(--ng-text, #20252b); }
.ngs-option { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--ng-border-strong, #ccc); border-radius: 10px; cursor: pointer; }
.ngs-option:has(input:checked) { border-color: var(--ng-primary, #458500); background: #f6faf2; }
.ngs-option input { margin-top: 3px; accent-color: var(--ng-primary, #458500); }
.ngs-option span { display: grid; gap: 2px; }
.ngs-option small { color: var(--ng-muted, #666); font-size: 13px; }
.ngs-terms { padding: 12px; border-radius: 10px; background: var(--ng-surface-soft, #f5f5f5); font-size: 13px; line-height: 18px; }
.ngs-terms p { margin: 0 0 10px; }
.ngs-check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; line-height: 20px; }
.ngs-check input { margin-top: 3px; accent-color: var(--ng-primary, #458500); }
.ngs-check a, .ngs-offer a, .ngs-link { color: var(--ng-primary-deep, #35780e); }
.ngs-link { padding: 0; border: 0; background: none; font: inherit; text-decoration: underline; cursor: pointer; }
.ngs-quote { padding: 12px 14px; border: 1px solid var(--ng-primary, #458500); border-radius: 12px; }
.ngs-quote h3, .ngs-pay h3 { margin: 0 0 8px; font-size: 16px; }
.ngs-quote dl { display: grid; gap: 4px; margin: 0 0 8px; }
.ngs-quote dl div { display: flex; justify-content: space-between; gap: 12px; }
.ngs-quote dt { margin: 0; }
.ngs-quote dd { margin: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ngs-quote .ngs-total { margin-top: 4px; padding-top: 6px; border-top: 1px solid var(--ng-border, #e6e8ea); font-weight: 700; font-size: 16px; }
.ngs-status { margin: 0; min-height: 20px; }
.ngs-status[data-kind="error"] { color: #b42318; font-weight: 700; }
.ngs-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.ngs-button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 10px 20px; border: 1px solid var(--ng-primary, #458500); border-radius: 9999px; background: var(--ng-primary, #458500); color: var(--ng-on-primary, #fff); font-family: inherit; font-size: 15px; font-weight: 700; line-height: 20px; text-decoration: none; cursor: pointer; }
.ngs-button:hover { background: var(--ng-primary-deep, #397000); }
.ngs-button:disabled { border-color: #d0d4d0; background: #e5e7e5; color: #555; cursor: default; }
.ngs-button--ghost { background: #fff; color: var(--ng-primary-deep, #35780e); }
.ngs-button--ghost:hover { background: #f6faf2; }
.ngs-pay { margin: 0 0 12px; padding: 12px; border-radius: 10px; background: var(--ng-surface-soft, #f5f5f5); }
.ngs-pre { white-space: pre-wrap; margin: 0; }
@media (max-width: 560px) {
  .ngs-dialog { width: 100vw; max-width: 100vw; max-height: 100dvh; margin: auto 0 0; border-radius: 16px 16px 0 0; }
  .ngs-sheet { max-height: 92dvh; }
  .ngs-row, .ngs-grid { grid-template-columns: minmax(0, 1fr); }
  .ngs-actions { justify-content: stretch; }
  .ngs-actions .ngs-button { flex: 1 1 100%; }
}
