:root {
  --pb-dialog-ink: #22272f;
  --pb-dialog-muted: #5a626d;
  --pb-dialog-border: #dfe3e8;
  --pb-dialog-panel: #f5f6f8;
  --pb-dialog-action: #812331;
  --pb-dialog-action-hover: #681b27;
  --pb-dialog-radius: 16px;
}

.modal-backdrop.in, .mfp-bg.mfp-ready { opacity: .54; }
.modal-backdrop, .mfp-bg { background: #171c25; }
body #part { background: rgba(23, 28, 37, .54); overflow-y: auto; }
body #lean_overlay { background: #171c25; opacity: .54 !important; }

.modal > .modal-dialog {
  width: min(600px, calc(100% - 24px));
  margin: clamp(12px, 7vh, 64px) auto;
}

body :is(.modal .modal-content, #loginmodal, #partcont, .mfp-content > [id^="popup-"][id$="-wrapper"], #popup-terms-block) {
  box-sizing: border-box;
  border: 1px solid var(--pb-dialog-border);
  border-radius: var(--pb-dialog-radius);
  background: #fff;
  color: var(--pb-dialog-ink);
  box-shadow: 0 18px 56px rgba(23, 28, 37, .22);
  font-family: Inter, Arial, sans-serif;
}

body #partcont {
  position: relative;
  width: min(600px, calc(100% - 24px));
  height: auto;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  margin: clamp(12px, 7vh, 64px) auto 16px;
  padding: 20px;
  overflow: auto;
}

#partcont:has(> .pb-dialog-close)::before { display: none; }
body #partcont .heading, body #partcont .mcartdivatem { padding-right: 42px; }
body #partcont .mini-cart-info { overflow-x: auto; }
body #partcont .mini-cart-info td { vertical-align: middle; }
body #partcont .mini-cart-info td img { max-width: 52px; border-radius: 8px; }
body #partcont .mini-cart-info td.remove { width: 1%; padding: 6px 4px; }
body :is(.pb-mini-cart-remove, .pb-order-remove) {
  display: inline-grid;
  place-items: center;
  box-sizing: border-box;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #e6ccd0;
  border-radius: 8px;
  background: #fff4f5;
  color: var(--pb-dialog-action);
  font: 600 23px/1 Arial, sans-serif;
  cursor: pointer;
}
body :is(.pb-mini-cart-remove, .pb-order-remove):focus-visible {
  outline: 2px solid var(--pb-dialog-action);
  outline-offset: 2px;
}
@media (hover: hover) {
  body :is(.pb-mini-cart-remove, .pb-order-remove):hover {
    background: var(--pb-dialog-action);
    color: #fff;
  }
}
@media (pointer: coarse) {
  body :is(.pb-mini-cart-remove, .pb-order-remove) { width: 44px; height: 44px; }
}
body #partcont .mini-cart-total { margin: 12px 0; }
body #partcont .checkout { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
body #partcont .checkout a { margin: 0; }

body #loginmodal {
  top: clamp(12px, 12vh, 100px) !important;
  left: 50% !important;
  width: min(420px, calc(100% - 24px));
  max-width: calc(100% - 24px);
  max-height: calc(100vh - 28px);
  max-height: calc(100dvh - 28px);
  margin-left: 0 !important;
  padding: 24px;
  transform: translateX(-50%);
  overflow-y: auto;
}

body #loginmodal .logintitle { text-align: left; margin: 0 42px 16px 0; }
body #loginmodal .login-help { margin-top: 14px; color: var(--pb-dialog-muted); }
body #loginmodal .txtfield { width: 100%; }
body #loginmodal #loginbtn { width: 100%; }

body .modal .modal-content,
body .mfp-content > [id^="popup-"][id$="-wrapper"] { overflow: hidden; }

body .mfp-content > [id^="popup-"][id$="-wrapper"] { width: calc(100% - 20px); }
body .mfp-content > #popup-purchase-wrapper { max-width: 560px; }

body :is(.modal .modal-header, .mfp-content [id^="popup-"][id$="-wrapper"] > .popup-heading) {
  position: relative;
  min-height: 0;
  padding: 18px 60px 16px 20px;
  border-bottom: 1px solid var(--pb-dialog-border);
  background: #fff;
  line-height: 1.35;
}

body :is(.modal .modal-title, .mfp-content .popup-heading, #loginmodal .logintitle, #partcont .mcartok) {
  color: var(--pb-dialog-ink);
  font-size: clamp(18px, 4vw, 21px);
  font-weight: 700;
  line-height: 1.3;
  text-transform: none;
}

#callback-box .modal-title + div { margin-top: 6px; color: var(--pb-dialog-muted); }
body :is(.modal .modal-body, #popup-purchase-wrapper .popup-center) { padding: 20px; }
body #popup-purchase-wrapper .payment-info > div { margin-top: 8px; }

body :is(.modal .modal-footer, .mfp-content [id^="popup-"][id$="-wrapper"] > .popup-footer) {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  height: auto;
  padding: 14px 20px;
  border-top: 1px solid var(--pb-dialog-border);
  background: var(--pb-dialog-panel);
}

body .modal .modal-footer::before, body .modal .modal-footer::after { display: none; }

body .modal .modal-header > .close,
body .mfp-content [id^="popup-"][id$="-wrapper"] > .mfp-close,
.pb-dialog-close {
  position: absolute;
  z-index: 5;
  inset: 10px 10px auto auto;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--pb-dialog-border);
  border-radius: 10px;
  background: var(--pb-dialog-panel);
  color: var(--pb-dialog-ink);
  font: 22px/1 Arial, sans-serif;
  text-indent: 0;
  text-shadow: none;
  cursor: pointer;
  opacity: 1;
}

body .mfp-content [id^="popup-"][id$="-wrapper"] > .mfp-close:hover,
body .modal .modal-header > .close:hover, .pb-dialog-close:hover { background: #e8ebef; }

body :is(.modal, #loginmodal, .mfp-content [id^="popup-"][id$="-wrapper"], .pb-checkout)
  :is(.form-control:not([type="file"]), .txtfield),
body #popup-purchase-wrapper .payment-info :is(input:not([type="checkbox"]):not([type="hidden"]), textarea) {
  min-height: 42px;
  max-width: 100%;
  border: 1px solid #cfd5dd;
  border-radius: 9px;
  background-color: #fcfcfd;
  color: var(--pb-dialog-ink);
  font-size: 14px;
  box-shadow: none;
}

body :is(.modal, #loginmodal, .mfp-content [id^="popup-"][id$="-wrapper"], .pb-checkout)
  :is(input, select, textarea, button, a):focus-visible,
#partcont :is(button, a):focus-visible {
  outline: 2px solid var(--pb-dialog-action);
  outline-offset: 2px;
}

body :is(.modal .modal-footer .btn, #loginmodal #loginbtn, #partcont .checkout a,
         #partcont .mcartright .testbutton, .mfp-content .popup-footer > :is(a, button),
         .pb-checkout #button-go, .pb-checkout #button-login, .pb-checkout #show-login .btn) {
  float: none;
  height: auto;
  min-height: 40px;
  margin: 0;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: var(--pb-dialog-action);
  color: #fff;
  box-shadow: none;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  text-transform: none;
  white-space: normal;
}

body :is(#button-callback, #loginmodal #loginbtn, #partcont .checkout a:last-child,
         #partcont .mcartright a.testbutton, .mfp-content .popup-footer #popup-checkout,
         .pb-checkout #button-go):hover { background: var(--pb-dialog-action-hover); color: #fff; }

body #partcont .checkout a:first-child,
body #partcont .mcartright button.testbutton,
body .mfp-content .popup-footer button,
body .modal .modal-footer .btn-default {
  border-color: #d5dbe2;
  background: #eef0f3 !important;
  color: var(--pb-dialog-ink) !important;
}

body #popup-purchase-wrapper .popup-footer { display: flex; padding: 14px 20px; }
body #popup-purchase-wrapper .popup-footer #popup-checkout-button:hover { background: var(--pb-dialog-action-hover); }
body #popup-purchase-wrapper .popup-heading { height: auto; padding: 18px 60px 16px 20px; }
body #popup-purchase-wrapper .mfp-close {
  inset: 10px 10px auto auto;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--pb-dialog-panel);
  color: var(--pb-dialog-ink);
  font: 22px/1 Arial, sans-serif;
  text-indent: 0;
}

body #partcont .mcartdiv { display: grid; gap: 16px; height: auto; }
body #partcont .mcartok { height: auto; margin: 0; padding-right: 42px; text-align: left; }
body #partcont .mcarti { display: block; float: none; width: auto; }
body #partcont .imagesd { display: flex; align-items: center; gap: 14px; background: var(--pb-dialog-panel); padding: 10px; border-radius: 10px; }
body #partcont .imagesd .iconer, body #partcont .imagesd > br { display: none; }
body #partcont .mcartimage { width: 80px; height: 80px; margin: 0; object-fit: contain; border-radius: 8px; background: #fff; }
body #partcont .mcartproductname { width: auto; height: auto; margin: 0; font-size: 14px; text-align: left; overflow-wrap: anywhere; }
body #partcont .mcartproductname a { color: var(--pb-dialog-ink) !important; }
body #partcont .mcartright { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; float: none; width: auto; margin: 0; font-size: 0; }
body #partcont .mcartright :is(br, .mcarthr), body #partcont .mcartdiv > .clearfix { display: none; }
body #partcont .mcartright a.testbutton,
body #partcont .checkout a:last-child { background: var(--pb-dialog-action) !important; color: #fff !important; }
body #partcont .mcartright a.testbutton { order: 2; }
body #partcont .mcartright a.testbutton:hover,
body #partcont .checkout a:last-child:hover { background: var(--pb-dialog-action-hover) !important; }

/* Checkout stays within the same content width as the rest of the storefront. */
.pb-checkout {
  display: flow-root;
  max-width: 100%;
  padding: clamp(10px, 2vw, 26px);
  background: var(--pb-dialog-panel);
  border-radius: var(--pb-dialog-radius);
  color: var(--pb-dialog-ink);
}

.pb-checkout h1 { margin: 0 0 18px; color: inherit; font-size: clamp(23px, 3vw, 32px); line-height: 1.2; text-transform: none; }
.pb-checkout #content { min-width: 0; }
.pb-checkout .checkout_form { clear: both; }
.pb-checkout :is(.fastorder-panel-default, .login-checkout) { border: 1px solid var(--pb-dialog-border); border-radius: 12px; background: #fff; box-shadow: none; }
.pb-checkout .fastorder-panel-default > .panel-heading {
  padding: 13px 16px;
  border-color: var(--pb-dialog-border);
  border-radius: 12px 12px 0 0;
  background: #fff !important;
  color: var(--pb-dialog-ink) !important;
  font-size: 16px;
  font-weight: 650;
}
.pb-checkout .panel-body { min-width: 0; }
.pb-checkout [aria-invalid="true"] { border-color: var(--pb-dialog-action); background-color: #fff6f7; }
.pb-checkout .pb-field-error { margin-top: 5px; color: var(--pb-dialog-action); }
.pb-checkout .table-responsive { margin-bottom: 12px; }
.pb-checkout :is(.shipping-method, .payment-method) .radio { margin: 8px 0 14px; }
.pb-checkout input:is([type="radio"], [type="checkbox"]) { accent-color: var(--pb-dialog-action); }
.pb-checkout :is(#agree-block, #payment_agree-block) .text-right { text-align: left; }
.pb-checkout .oct-fastorder-payment { margin: 6px 0 12px; }
.pb-checkout #button-go {
  min-width: min(230px, 100%);
  background: var(--pb-dialog-action) !important;
  color: #fff !important;
}
.pb-checkout #button-go:hover { background: var(--pb-dialog-action-hover) !important; }

@media (max-width: 767px) {
  body #callback-box .form-horizontal .form-group { margin-inline: 0; }
  body #callback-box .form-horizontal .form-group > div { padding-inline: 0; }
  body :is(.modal .modal-footer .btn, .mfp-content .popup-footer > :is(a, button), #partcont .mcartright .testbutton) { flex: 1 1 auto; }
  body :is(.modal, #loginmodal, .mfp-content [id^="popup-"][id$="-wrapper"], .pb-checkout)
    :is(input.form-control, textarea.form-control, select.form-control, .txtfield),
  body #popup-purchase-wrapper .payment-info :is(input:not([type="checkbox"]):not([type="hidden"]), textarea) { font-size: 16px; }
  .pb-checkout .oct-fastorder-payment #button-go { width: 100%; }
}

.pb-checkout .pb-checkout-country {
  display: inline-block;
  margin-left: 6px;
  color: #606974;
  font-size: 0.92em;
}
.pb-checkout .pb-checkout-region-status:not(:empty) { margin: 6px 0 0; }
.pb-checkout .pb-checkout-note summary {
  color: var(--pb-dialog-action);
  font-weight: 600;
  cursor: pointer;
}
.pb-checkout .pb-checkout-note textarea { margin-top: 8px; }
.pb-checkout .pb-checkout-agreement {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  width: fit-content;
  max-width: 100%;
  font-weight: normal;
  cursor: pointer;
}
.pb-checkout .pb-checkout-agreement input { flex: none; margin: 3px 0 0; }

@media (max-width: 767px) {
  .pb-checkout #cart-table .table-responsive > .fastorder-table-bordered,
  .pb-checkout #cart-table .table-responsive > .fastorder-table-bordered > tbody {
    display: block;
    width: 100%;
    border: 0;
  }
  .pb-checkout #cart-table .table-responsive > .fastorder-table-bordered > thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .pb-checkout #cart-table .table-responsive > .fastorder-table-bordered > tbody > tr {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    grid-template-areas: "photo name remove" "photo model remove" ". quantity total" ". unit unit";
    align-items: center;
    gap: 4px 8px;
    padding: 8px 0;
  }
  .pb-checkout #cart-table .table-responsive > .fastorder-table-bordered > tbody > tr + tr {
    border-top: 1px solid var(--pb-dialog-border);
  }
  .pb-checkout #cart-table .table-responsive > .fastorder-table-bordered > tbody > tr > td {
    display: block;
    min-width: 0;
    padding: 0;
    border: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .pb-checkout #cart-table .table-responsive > .fastorder-table-bordered > tbody > tr > :nth-child(1) { grid-area: photo; }
  .pb-checkout #cart-table .table-responsive > .fastorder-table-bordered > tbody > tr > :nth-child(2) { grid-area: name; font-weight: 600; }
  .pb-checkout #cart-table .table-responsive > .fastorder-table-bordered > tbody > tr > :nth-child(3) { grid-area: model; color: #606974; font-size: 0.88em; }
  .pb-checkout #cart-table .table-responsive > .fastorder-table-bordered > tbody > tr > :nth-child(4) { grid-area: quantity; }
  .pb-checkout #cart-table .table-responsive > .fastorder-table-bordered > tbody > tr > :nth-child(5) { grid-area: unit; color: #606974; font-size: 0.88em; }
  .pb-checkout #cart-table .table-responsive > .fastorder-table-bordered > tbody > tr > :nth-child(6) { grid-area: total; font-weight: 700; }
  .pb-checkout #cart-table .table-responsive > .fastorder-table-bordered > tbody > tr > :nth-child(7) { grid-area: remove; justify-self: end; }
  .pb-checkout #cart-table .order-quantity { min-width: 32px; padding-inline: 4px; text-align: center; }
}

body .input-group-btn > .pb-order-remove { margin-inline-start: 4px; vertical-align: middle; }
