/* ============================================================================
   PDPeptides on WordPress — only what the static site does not have:
   WooCommerce's own pages (checkout, order received, account), the site's
   real forms (WPForms on Контакти, the code check on Провери код) and editor
   content — all dressed in the design's tokens and controls. Nothing here
   restyles the design itself.
   ============================================================================ */

/* the WordPress toolbar (logged-in editors) sits above the fixed header */
body.admin-bar .hd { top: 32px; }
@media (max-width: 782px) { body.admin-bar .hd { top: 46px; } }
#wpadminbar { position: fixed !important; }

/* ── the design's controls, for markup that comes from plugins ─────────── */
:is(.woo, .wp-slot, .wp-content) :is(input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="number"], input[type="search"], input[type="url"], input:not([type]), select, textarea):not(.select2-search__field) {
  width: 100%; min-height: 52px; padding: 0 16px; border-radius: var(--r-cut);
  background-color: var(--surface); color: var(--text); border: 1px solid var(--line-2); outline: none;
  font: 400 16px/1.4 var(--f-text); box-shadow: none; transition: border-color .2s, box-shadow .2s;
}
:is(.woo, .wp-slot, .wp-content) textarea { padding: 14px 16px; min-height: 140px; resize: vertical; }
:is(.woo, .wp-slot, .wp-content) select:is(select) { appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%239d94b1' stroke-width='1.6'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; }
:is(.woo, .wp-slot, .wp-content) select option { background: var(--surface); }
:is(.woo, .wp-slot, .wp-content) :is(input, select, textarea)::placeholder { color: var(--muted); }
:is(.woo, .wp-slot, .wp-content) :is(input, select, textarea):focus { border-color: var(--electric); box-shadow: 0 0 0 3px rgba(139,69,255,.22); }
:is(.woo, .wp-slot, .wp-content) :is(input[type="checkbox"], input[type="radio"]) { width: 18px; height: 18px; min-height: 0; accent-color: var(--electric); margin: 0 8px 0 0; vertical-align: -3px; }
:is(.woo, .wp-slot) label { display: block; margin-bottom: 6px; font: 500 var(--t-sm)/1.4 var(--f-text); color: var(--text-2); }
:is(.woo, .wp-slot) label.checkbox, :is(.woo, .wp-slot) label:has(> input[type="checkbox"]), :is(.woo, .wp-slot) label:has(> input[type="radio"]) { display: flex; align-items: flex-start; gap: 4px; font-weight: 400; cursor: pointer; }
:is(.woo, .wp-slot) :is(.required, abbr.required) { color: var(--lav); text-decoration: none; border: 0; }

/* buttons: the design's button; secondary actions as its outline variant */
:is(.woo, .wp-slot) :is(.button, button[type="submit"], input[type="submit"], .wpforms-submit, .form-submit__product-lookup) {
  --bh: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: var(--bh); padding: 0 26px; border: 0; border-radius: var(--cut); corner-shape: bevel; cursor: pointer;
  font: 500 15.5px/1 var(--f-text); letter-spacing: 0; text-decoration: none; white-space: nowrap;
  background: var(--electric); color: #fff;
  box-shadow: 0 0 0 1px rgba(255,255,255,.14) inset, 0 12px 40px -12px rgba(139,69,255,.7);
  transition: background-color .3s var(--e), box-shadow .3s var(--e);
}
:is(.woo, .wp-slot) :is(.button, button[type="submit"], input[type="submit"], .wpforms-submit, .form-submit__product-lookup):hover { background: #7a2df0; color: #fff; }
@supports not (corner-shape: bevel) { :is(.woo, .wp-slot) :is(.button, button[type="submit"], input[type="submit"], .wpforms-submit, .form-submit__product-lookup) { border-radius: var(--r-cut); } }
.woo :is(.woocommerce-button--previous, .woocommerce-Button--previous, .button.view, .woocommerce-form-coupon button, .checkout_coupon .button, .woocommerce-MyAccount-downloads-file) {
  background: rgba(7,6,11,.35); box-shadow: inset 0 0 0 1.5px var(--line-2); }
:is(.woo, .wp-slot) :is(.button, button)[disabled], .woo .button.disabled { opacity: .55; pointer-events: none; }

/* notices: the design's note, with a coloured edge */
.woo :is(.woocommerce-error, .woocommerce-info, .woocommerce-message, .woocommerce-notice),
.wp-slot :is(.notice-box, .wpforms-confirmation-container-full, .wpforms-error-container) {
  display: grid; gap: 6px; list-style: none; margin: 0 0 20px; padding: 14px 16px 14px 18px; border-radius: var(--r-cut);
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), inset 3px 0 0 var(--electric);
  font-size: var(--t-sm); line-height: 1.5; color: var(--text-2);
}
.woo .woocommerce-error, .wp-slot .notice-box--warning, .wp-slot .wpforms-error-container { box-shadow: inset 0 0 0 1px var(--line), inset 3px 0 0 var(--danger); }
.wp-slot .notice-box--success { box-shadow: inset 0 0 0 1px var(--line), inset 3px 0 0 #4ade80; }
.woo :is(.woocommerce-error, .woocommerce-info, .woocommerce-message) :is(a, .button) { color: var(--lav); }
.woo :is(.woocommerce-info, .woocommerce-message) .button { float: none; order: 2; justify-self: start; --bh: 40px; }
.woo .woocommerce-error li { list-style: none; }
.woo :is(.woocommerce-error, .woocommerce-info, .woocommerce-message)::before { display: none; }
:is(.woo, .wp-slot) :is(label.error, .wpforms-error, .woocommerce-invalid-required-field .required) { color: var(--danger); font-size: 13px; }
.woo .woocommerce-invalid :is(input, select) { border-color: var(--danger); }

/* ── checkout: the form left, the order summary right and sticky ────────── */
.woo-page { padding-bottom: var(--sec, 120px); }
.woo form.checkout { display: grid; gap: var(--s7, 48px); }
@media (min-width: 1000px) {
  .woo form.checkout { grid-template-columns: minmax(0, 1fr) 420px; align-items: start; }
  .woo .woo-sum { position: sticky; top: calc(var(--hd-h) + 24px); }
}
.woo form.checkout > :is(.woocommerce-NoticeGroup, .woocommerce-notices-wrapper) { grid-column: 1 / -1; }
.woo .col2-set { display: grid; gap: 40px; }
.woo .col2-set > * { width: auto; float: none; }
.woo :is(h2, h3):not(.d-1) { font: 500 clamp(22px, 1.9vw, 28px)/1.1 var(--f-display); color: var(--text); margin: 0 0 18px; letter-spacing: -.005em; }
.woo :is(.woocommerce-billing-fields__field-wrapper, .woocommerce-shipping-fields__field-wrapper, .woocommerce-additional-fields__field-wrapper, .woocommerce-address-fields__field-wrapper) {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.woo .form-row { margin: 0; padding: 0; grid-column: 1 / -1; }
@media (min-width: 600px) { .woo :is(.form-row-first, .form-row-last) { grid-column: auto; } }
.woo .form-row .woocommerce-input-wrapper { display: block; }
.woo .form-row .description { margin-top: 6px; font-size: 13px; color: var(--muted); }
.woo #ship-to-different-address { margin: 8px 0 16px; font: 500 16px/1.4 var(--f-text); }
.woo #ship-to-different-address label { display: flex; align-items: center; font-size: 16px; color: var(--text); }
.woo .woocommerce-form-coupon-toggle .woocommerce-info { box-shadow: inset 0 0 0 1px var(--line); }
.woo .checkout_coupon { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; padding: 16px; background: var(--surface); border-radius: var(--r-cut); box-shadow: inset 0 0 0 1px var(--line); }
.woo .checkout_coupon p { margin: 0; flex: 1 1 220px; }
.woo .checkout_coupon p:first-child { flex-basis: 100%; color: var(--text-2); font-size: var(--t-sm); }

/* the summary: the design's .sum */
.woo .woo-sum { display: grid; gap: 16px; padding: 24px; background: var(--surface); border-radius: var(--r-cut); box-shadow: inset 0 0 0 1px var(--line-2), inset 0 1px 0 var(--electric-2); }
.woo .woo-sum #order_review_heading { margin: 0; }
.woo table.shop_table { width: 100%; border-collapse: collapse; font-size: 15px; color: var(--text-2); }
.woo table.shop_table :is(th, td) { padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; background: none; }
.woo table.shop_table :is(th, td):last-child { text-align: right; }
.woo table.shop_table thead th { font: 500 12.5px/1.3 var(--f-text); color: var(--muted); }
.woo table.shop_table .product-name { color: var(--text); }
.woo table.shop_table .product-quantity { color: var(--muted); font-weight: 400; }
.woo table.shop_table :is(.woocommerce-Price-amount, .amount) { font: 600 17px/1 var(--f-display); color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.woo table.shop_table .order-total :is(th, td) { padding-top: 16px; border-bottom: 0; color: var(--text); }
.woo table.shop_table .order-total .amount { font-size: 30px; }
.woo table.shop_table tfoot th { font-weight: 400; }
/* shipping: its own full-width row in the summary, the choices as the design's .ship options */
.woo table.shop_table tr.woocommerce-shipping-totals { display: grid; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.woo table.shop_table tr.woocommerce-shipping-totals :is(th, td) { display: block; padding: 0; border: 0; text-align: left; }
.woo #shipping_method { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; width: 100%; text-align: left; }
.woo #shipping_method li { display: flex; align-items: center; gap: 4px; padding: 12px 14px; border-radius: 4px; box-shadow: inset 0 0 0 1.5px var(--line-2); }
.woo #shipping_method li:has(input:checked) { box-shadow: inset 0 0 0 2px var(--electric); background: rgba(139,69,255,.10); }
.woo #shipping_method label { margin: 0; color: var(--text); font-weight: 400; }

/* payment: the design's .pay */
.woo #payment { background: none; border-radius: 0; }
.woo #payment .wc_payment_methods { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; border: 0; }
.woo #payment .wc_payment_method { padding: 14px 16px; border-radius: var(--r-cut); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.woo #payment .wc_payment_method:has(> input:checked), .woo #payment .wc_payment_methods > li:only-child { box-shadow: inset 0 0 0 2px var(--electric); background: rgba(139,69,255,.10); }
.woo #payment .wc_payment_method > label { display: inline; margin: 0; font: 500 19px/1.2 var(--f-display); color: var(--text); }
.woo #payment .payment_box { margin-top: 8px; padding: 0; background: none; color: var(--text-2); font-size: var(--t-sm); }
.woo #payment .payment_box::before { display: none; }
.woo #payment .place-order { display: grid; gap: 14px; padding: 0; }
.woo #payment #place_order { width: 100%; --bh: 56px; }
.woo .woocommerce-terms-and-conditions-wrapper, .woo .woocommerce-privacy-policy-text { font-size: 13px; line-height: 1.5; color: var(--muted); }
.woo .woocommerce-terms-and-conditions-wrapper a, .woo .woocommerce-privacy-policy-text a { color: var(--lav); text-decoration: underline; text-underline-offset: 3px; }

/* selectWoo / select2 (state, office and city pickers) */
.woo .select2-container .select2-selection--single { height: 52px; display: flex; align-items: center; border-radius: var(--r-cut); background: var(--surface); border: 1px solid var(--line-2); }
.woo .select2-container .select2-selection--single .select2-selection__rendered { color: var(--text); padding-left: 16px; line-height: 50px; }
.woo .select2-container .select2-selection--single .select2-selection__arrow { height: 50px; right: 10px; }
.select2-dropdown { background: var(--surface-2); border-color: var(--line-2); color: var(--text); }
.select2-container--default .select2-search--dropdown .select2-search__field { background: var(--surface); color: var(--text); border: 1px solid var(--line-2); }
.select2-container--default .select2-results__option--highlighted[aria-selected], .select2-container--default .select2-results__option--highlighted[data-selected] { background: var(--electric); color: #fff; }
.select2-container--default .select2-results__option[aria-selected="true"], .select2-container--default .select2-results__option[data-selected="true"] { background: rgba(139,69,255,.18); }

/* WooCommerce's loading veil */
.woo .blockUI.blockOverlay { background: rgba(7,6,11,.6) !important; opacity: 1 !important; }

/* ── order received, account ───────────────────────────────────────────── */
.woo .woocommerce-order { display: grid; gap: 28px; max-width: 880px; }
.woo .woocommerce-thankyou-order-received { font: 500 clamp(22px, 2vw, 28px)/1.2 var(--f-display); color: var(--text); }
.woo ul.woocommerce-order-overview { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1px; background: var(--line); border-radius: var(--r-cut); overflow: hidden; }
.woo ul.woocommerce-order-overview li { padding: 16px 18px; background: var(--surface); font-size: 13px; color: var(--muted); border: 0; margin: 0; }
.woo ul.woocommerce-order-overview li strong { display: block; margin-top: 6px; font: 600 18px/1.2 var(--f-display); color: var(--text); }
.woo address { font-style: normal; line-height: 1.6; color: var(--text-2); padding: 18px; border-radius: var(--r-cut); box-shadow: inset 0 0 0 1px var(--line); }
.woo .woocommerce-MyAccount-navigation ul { list-style: none; margin: 0 0 28px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.woo .woocommerce-MyAccount-navigation a { display: inline-flex; padding: 10px 14px; border-radius: var(--r-cut); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--text-2); font-size: 14.5px; }
.woo .woocommerce-MyAccount-navigation .is-active a { box-shadow: inset 0 0 0 2px var(--electric); color: var(--text); }
.woo .woocommerce-MyAccount-content { display: grid; gap: 18px; color: var(--text-2); }
.woo .woocommerce-MyAccount-content a:not(.button) { color: var(--lav); text-decoration: underline; text-underline-offset: 3px; }
.woo :is(.woocommerce-form-login, .woocommerce-form-register, .woocommerce-ResetPassword, .woocommerce-EditAccountForm, .edit-account) { display: grid; gap: 16px; max-width: 520px; }
.woo .u-columns.col2-set { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.woo .lost_password a { color: var(--lav); font-size: 14px; }
.woo .woocommerce-form-login__rememberme { display: flex; align-items: center; }

/* ── the site's real forms, in the slots the design had for them ────────── */
.wp-slot { max-width: 640px; }
.wp-slot--lookup { max-width: 560px; }
/* Провери код (product-lookup plugin) */
.wp-slot .container__product-lookup { display: grid; gap: 12px; }
.wp-slot .h2__product-lookup { font: 500 13px/1.3 var(--f-text); color: var(--lav); margin: 0; }
.wp-slot .lookup__product-lookup { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; }
.wp-slot .label__product-lookup { display: grid; gap: 6px; margin: 0; }
.wp-slot .input-text__product-lookup { height: 56px; font-family: var(--f-mono) !important; letter-spacing: .08em; }
.wp-slot .form-submit__product-lookup { --bh: 56px; }
@media (max-width: 480px) { .wp-slot .lookup__product-lookup { grid-template-columns: 1fr; } }
.wp-slot .heading-3__notice-box { font: 500 19px/1.2 var(--f-display); color: var(--text); margin: 0; }
.wp-slot .paragraph__notice-box { margin: 0; }
.wp-slot .product-code-span { font-family: var(--f-mono); color: var(--text); }
.wp-slot--lookup .hidden { display: none !important; }
.wp-slot .loader-wrapper__product-lookup { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; }
.wp-slot .loader__product-lookup { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--electric); animation: pd-spin .8s linear infinite; }
@keyframes pd-spin { to { transform: rotate(360deg); } }
/* Контакти (WPForms, modern markup: its own variables, set to the design's) */
.wp-slot .wpforms-container {
  --wpforms-field-background-color: var(--surface); --wpforms-field-border-color: var(--line-2); --wpforms-field-text-color: var(--text);
  --wpforms-field-border-radius: 2px; --wpforms-field-size-input-height: 52px; --wpforms-field-size-font-size: 16px;
  --wpforms-label-color: var(--text-2); --wpforms-label-sublabel-color: var(--muted); --wpforms-label-error-color: var(--danger);
  --wpforms-button-background-color: var(--electric); --wpforms-button-text-color: #fff; --wpforms-button-border-radius: 10px;
  --wpforms-button-size-height: 56px; --wpforms-field-menu-color: var(--surface);
  margin: 0 !important;
}
.wp-slot .wpforms-field-container { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.wp-slot .wpforms-field { grid-column: 1 / -1; padding: 0 !important; margin: 0 !important; width: auto !important; float: none !important; }
@media (min-width: 700px) { .wp-slot .wpforms-field:is(.wpforms-one-third) { grid-column: span 2; } .wp-slot .wpforms-field:is(.wpforms-one-half) { grid-column: span 3; } }
.wp-slot .wpforms-field-label { font: 500 var(--t-sm)/1.4 var(--f-text) !important; color: var(--text-2) !important; margin-bottom: 6px !important; }
.wp-slot .wpforms-field-sublabel, .wp-slot .wpforms-field-description { font-size: 13px !important; color: var(--muted) !important; }
.wp-slot .wpforms-submit-container { margin-top: 20px !important; padding: 0 !important; }
.wp-slot .wpforms-field :is(ul, ol) { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.wp-slot .wpforms-field li { display: flex; align-items: flex-start; gap: 10px; margin: 0 !important; padding: 0 !important; }
.wp-slot .wpforms-field li label { display: inline; margin: 0; font-weight: 400; color: var(--text-2); line-height: 1.45; }
.wp-slot .wpforms-field li input { margin-top: 2px !important; flex: none; }
/* the content filter's automatic <br>s inside plugin markup */
.wp-slot :is(.lookup__product-lookup, .label__product-lookup, .wpforms-field) > br { display: none; }

/* ── editor content on any other page ───────────────────────────────────── */
.wp-page { padding-bottom: var(--sec, 120px); }
.wp-page .art__prose { max-width: 72ch; }
.wp-content a:not(.btn):not(.button) { color: var(--lav); text-decoration: underline; text-underline-offset: 3px; }
.wp-content ol { display: grid; gap: 10px; padding-left: 1.4em; }
.wp-content ol li { padding-left: 4px; }
.wp-content ol li::before { display: none; }
.wp-content :is(img, video, iframe) { max-width: 100%; height: auto; border-radius: var(--r-cut); }
.wp-content figure { margin: 8px 0; }
.wp-content figcaption { margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.wp-content table { width: 100%; border-collapse: collapse; font-size: 15px; }
.wp-content :is(th, td) { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.wp-content th { color: var(--text); font-weight: 600; }
.wp-content hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.wp-content strong, .wp-content b { color: var(--text); font-weight: 600; }
.wp-content h4 { font: 600 17px/1.3 var(--f-text); color: var(--text); }
.woo .pd-econt { margin: 28px 0 24px; }
/* the live shop's order: e-mail, phone, name, surname, country (WooCommerce's
   address script re-sorts the rows in the DOM, so the grid places them) */
.woo .woocommerce-billing-fields__field-wrapper > * { order: 10; }
.woo #billing_email_field { order: 1; } .woo #billing_phone_field { order: 2; }
.woo #billing_first_name_field { order: 3; } .woo #billing_last_name_field { order: 4; }
.woo #billing_country_field { order: 5; }
@media (min-width: 600px) { .woo :is(#billing_email_field, #billing_phone_field, #billing_first_name_field, #billing_last_name_field) { grid-column: auto; } }
/* the Econt office: city and address side by side, as the name rows above */
.woo .pd-econt { display: grid; grid-template-columns: 1fr; column-gap: 16px; }
.woo .pd-econt > * { grid-column: 1 / -1; }
@media (min-width: 600px) { .woo .pd-econt { grid-template-columns: 1fr 2fr; } .woo #econt_office_city_field { grid-column: 1; } .woo #econt_office_address_field { grid-column: 2; } }
/* WPConsent's banner (z-index 900000, fixed at the bottom) covered the 18+
   gate's buttons on phones, and the gate makes the rest of the page inert, so
   neither could be pressed. While the gate is open the banner waits; it shows
   the moment the visitor confirms their age (html.gate is removed then). */
html.gate #wpconsent-root { display: none !important; }
