/*
 * Автономні live-стилі для [hp_domain_registration_widget].
 *
 * Цей файл підключається напряму з functions.php тільки на цільовій статті
 * або коли shortcode є в контенті. Він не генерується через npm run build.
 *
 * Якщо пізніше віджет повністю перенесуть у build pipeline теми, під час
 * переходу тримайте цей файл і src/scss/blocks/_domain-registration-widget.scss
 * синхронізованими, а потім видаліть окреме enqueue-підключення.
 */

.hp-domain-widget {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 34px;
  padding: 18px 0 76px;
  background: inherit;
  color: #fff;
}

.hp-domain-widget__hero {
  width: calc(100% - 32px);
  max-width: 1110px;
  min-height: 258px;
  padding: 70px 24px 54px;
  border-radius: 7px;
  background: linear-gradient(118deg, #15235d 0%, #335aa9 100%);
  text-align: center;
}

.hp-domain-widget__title {
  margin: 0;
  font-family: "Exo 2", sans-serif;
  font-size: 38px;
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
}

.hp-domain-widget__subtitle {
  margin: 20px 0 0;
  font-size: 21px;
  line-height: 1.45;
  color: #fff;
}

.hp-domain-widget__form {
  position: relative;
  display: flex;
  align-items: center;
  gap: 15px;
  width: calc(100% - 32px);
  max-width: 1110px;
  margin-top: 60px;
  margin-right: auto;
  margin-left: auto;
  padding: 13px 31px 13px 29px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: #fff;
}

.hp-domain-widget__input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  gap: 18px;
  min-width: 0;
  border: 0 !important;
  background: transparent;
  box-shadow: none;
  outline: 0;
}

.hp-domain-widget__search-icon {
  display: inline-block;
  flex: 0 0 31px;
  width: 31px;
  height: 31px;
  color: #aeb5c2;
}

.hp-domain-widget__globe-icon {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 34px;
  color: #aeb5c2;
}

.hp-domain-widget__search-icon svg,
.hp-domain-widget__globe-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.hp-domain-widget__zone-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 48px;
  gap: 8px;
  margin-left: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #aeb5c2;
  cursor: pointer;
}

.hp-domain-widget__zone-count {
  position: absolute;
  right: -7px;
  bottom: -1px;
  min-width: 12px;
  height: 12px;
  padding: 0 2px;
  border-radius: 999px;
  background: transparent;
  color: #aeb5c2;
  font-size: 16px;
  font-weight: 400;
  line-height: 12px;
  text-align: center;
}

.hp-domain-widget__zone-count.is-active {
  background: #fff;
  box-shadow: 0 0 0 1px #fff;
  color: #ffa800;
}

.hp-domain-widget__input {
  -webkit-appearance: none;
  appearance: none;
  flex: 1 1 auto;
  min-width: 0;
  height: 48px;
  padding: 0;
  border: 0 !important;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #26324d;
  font-size: 20px;
  line-height: 1.3;
  outline: 0;
}

.hp-domain-widget__input::placeholder {
  color: #aeb5c2;
}

.hp-domain-widget__input:focus {
  border-color: transparent;
  box-shadow: none;
  outline: 0;
}

.hp-domain-widget__plus {
  font-size: 20px;
  line-height: 1;
}

.hp-domain-widget__submit {
  flex: 0 0 220px;
  height: 48px;
  border: 0;
  border-radius: 3px;
  background: #3d538f;
  color: #fff;
  font-size: 18px;
  transition: opacity 200ms linear, background-color 200ms linear;
}

.hp-domain-widget__submit:hover,
.hp-domain-widget__submit:focus {
  background: #32477f;
}

.hp-domain-widget__error {
  position: absolute;
  left: 59px;
  bottom: -30px;
  display: none;
  margin: 0;
  color: #c63d3d;
  font-size: 14px;
  line-height: 1.4;
}

.hp-domain-widget__form.is-error .hp-domain-widget__input {
  color: #c63d3d;
}

.hp-domain-widget__form.is-error {
  border-color: #c63d3d;
}

.hp-domain-widget__form.is-error .hp-domain-widget__error {
  display: block;
}

.hp-domain-widget__form.is-loading .hp-domain-widget__submit {
  opacity: 0.7;
  pointer-events: none;
}

.hp-domain-widget__results {
  width: calc(100% - 32px);
  max-width: 1110px;
  margin-top: 24px;
  margin-right: auto;
  margin-left: auto;
  color: #26324d;
  font-size: 17px;
  line-height: 1.45;
}

.hp-domain-widget__results p,
.hp-domain-widget__results ul {
  margin: 0;
}

.hp-domain-widget__results-controls {
  display: flex;
  justify-content: flex-end;
  min-height: 88px;
  padding: 30px;
  border-radius: 3px;
  background: #fff;
}

.hp-domain-widget__toggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #26324d;
  cursor: pointer;
  font-size: 16px;
}

.hp-domain-widget__toggle input {
  position: absolute;
  opacity: 0;
}

.hp-domain-widget__toggle-ui {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  width: 60px;
  height: 30px;
  padding: 0 7px;
  border: 1px solid #e3e6ec;
  border-radius: 999px;
  background: #f8f8f8;
  color: #606875;
  font-size: 11px;
  line-height: 1;
}

.hp-domain-widget__toggle-ui::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(38, 50, 77, 0.18);
  transition: transform 180ms linear;
}

.hp-domain-widget__toggle input:checked + .hp-domain-widget__toggle-ui {
  justify-content: flex-start;
  background: #3d538f;
  color: #fff;
}

.hp-domain-widget__toggle input:checked + .hp-domain-widget__toggle-ui::before {
  transform: translateX(30px);
}

.hp-domain-widget__results-list-wrap {
  margin-top: 26px;
  margin-bottom: 64px;
  padding: 30px;
  border-radius: 3px;
  background: #fafafa;
}

.hp-domain-widget__results-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0;
  list-style: none;
}

.hp-domain-widget__result-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 108px;
  padding: 22px 30px;
  background: #fff;
}

.hp-domain-widget__result-card + .hp-domain-widget__result-card {
  border-top: 0;
}

.hp-domain-widget__result-content {
  display: flex;
  align-items: center;
  gap: 28px;
  min-width: 0;
}

.hp-domain-widget__status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 60px;
  width: 60px;
  height: 60px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.hp-domain-widget__status-icon svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.hp-domain-widget__result-card--available {
  color: #4b9418;
}

.hp-domain-widget__result-card--unavailable {
  color: #c63d3d;
}

.hp-domain-widget__result-card strong {
  font-weight: 700;
}

.hp-domain-widget__price {
  color: #26324d;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.2;
}

.hp-domain-widget__add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 56px;
  width: 56px;
  height: 44px;
  border-radius: 3px;
  background: #ffa800;
  color: #fff;
  font-size: 26px;
  line-height: 1;
  text-decoration: none;
  transition: opacity 180ms linear;
}

.hp-domain-widget__add:hover {
  color: #fff;
  opacity: 0.82;
}

.hp-domain-widget__cart-action {
  flex: 0 0 auto;
}

.hp-domain-widget__added-actions {
  display: none;
}

.hp-domain-widget__continue {
  display: none;
  min-width: 160px;
  height: 44px;
  border: 0;
  border-radius: 3px 0 0 3px;
  background: #ffa800;
  color: #fff;
  cursor: pointer;
  font-size: 16px;
}

.hp-domain-widget__open-cart {
  display: none;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 44px;
  border: 1px solid #dadde5;
  border-radius: 0 3px 3px 0;
  background: #fff;
  color: var(--gray-icons, #aeb5c2);
  cursor: pointer;
  transition: color 250ms linear, opacity 250ms linear;
}

.hp-domain-widget__open-cart svg {
  width: 24px;
  height: 22px;
  fill: currentColor;
}

.hp-domain-widget__open-cart:hover,
.hp-domain-widget__open-cart:focus {
  color: var(--gray-icons, #aeb5c2);
  opacity: 0.6;
}

.hp-domain-widget__cart-action.is-in-cart .hp-domain-widget__add {
  display: none;
}

.hp-domain-widget__cart-action.is-in-cart .hp-domain-widget__added-actions {
  display: inline-flex;
}

.hp-domain-widget__cart-action.is-in-cart .hp-domain-widget__continue,
.hp-domain-widget__cart-action.is-in-cart .hp-domain-widget__open-cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hp-domain-widget__results.is-error .hp-domain-widget__results-list-wrap {
  margin-bottom: 0;
  border-left: 4px solid #c63d3d;
}

.hp-domain-widget__results.is-error a {
  color: #3d538f;
  font-weight: 600;
  text-decoration: underline;
}

.hp-domain-widget-modal-open {
  overflow: hidden;
}

.hp-domain-widget__modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.62);
  color: #26324d;
}

.hp-domain-widget__modal[hidden] {
  display: none;
}

.hp-domain-widget__modal-dialog {
  display: flex;
  flex-direction: column;
  width: min(730px, 100%);
  max-height: min(640px, calc(100vh - 48px));
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.hp-domain-widget__modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 30px 18px;
  border-bottom: 1px solid #dadde5;
}

.hp-domain-widget__modal-header h3 {
  margin: 0;
  color: #26324d;
  font-family: "Exo 2", sans-serif;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.2;
}

.hp-domain-widget__modal-close {
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: #aeb5c2;
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
}

.hp-domain-widget__modal-body {
  flex: 1;
  padding: 24px 30px;
  overflow: auto;
}

.hp-domain-widget__modal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.hp-domain-widget__modal-toolbar label {
  position: relative;
  flex: 1;
  max-width: 386px;
}

.hp-domain-widget__modal-toolbar input {
  width: 100%;
  height: 45px;
  padding: 0 46px 0 16px;
  border: 1px solid #dadde5;
  border-radius: 3px;
  color: #26324d;
  font-size: 16px;
}

.hp-domain-widget__modal-toolbar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  font-size: 14px;
}

.hp-domain-widget__modal-toolbar a {
  color: #26324d;
  text-decoration: underline;
}

.hp-domain-widget__zone-groups p {
  margin: 0 0 12px;
  color: #26324d;
  font-size: 14px;
}

.hp-domain-widget__zone-groups ul {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
}

.hp-domain-widget__zone-groups label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 31px;
  padding: 5px 8px;
  border: 1px solid #dadde5;
  border-radius: 3px;
  color: #26324d;
  cursor: pointer;
  font-size: 16px;
  line-height: 1.2;
}

.hp-domain-widget__zone-groups label.is-active {
  border-color: #333;
  background: #333;
  color: #fff;
}

.hp-domain-widget__zone-checkbox {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.hp-domain-widget__zone-groups label span:last-child {
  color: #ffa800;
  font-size: 18px;
  line-height: 1;
}

.hp-domain-widget__modal-empty {
  color: #c63d3d;
}

.hp-domain-widget__modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 30px;
  background: #f3f3f3;
}

.hp-domain-widget__selected-zones {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hp-domain-widget__selected-zones button {
  min-height: 32px;
  border: 0;
  border-radius: 3px;
  background: #333;
  color: #fff;
  cursor: pointer;
  font-size: 16px;
}

.hp-domain-widget__selected-zones span {
  color: #ffa800;
}

.hp-domain-widget__zones-clear {
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #26324d;
  cursor: pointer;
  text-decoration: underline;
}

.hp-domain-widget__modal-actions {
  display: flex;
  gap: 12px;
}

.hp-domain-widget__modal-primary,
.hp-domain-widget__modal-secondary {
  min-width: 160px;
  height: 49px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 18px;
}

.hp-domain-widget__modal-primary {
  border: 0;
  background: #ffa800;
  color: #fff;
}

.hp-domain-widget__modal-secondary {
  border: 1px solid #dadde5;
  background: #fff;
  color: #26324d;
}

.hp-domain-widget__cart-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.78);
  color: #333;
}

.hp-domain-widget__cart-modal[hidden] {
  display: none;
}

.hp-domain-widget__cart-dialog {
  width: min(730px, 100%);
  height: min(550px, calc(100vh - 48px));
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.hp-domain-widget__cart-dialog form {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  height: 100%;
}

.hp-domain-widget__cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 30px;
  border-bottom: 1px solid #dadde5;
  background: #f3f3f3;
}

.hp-domain-widget__cart-header h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
}

.hp-domain-widget__cart-close {
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: #aeb5c2;
  cursor: pointer;
  font-size: 30px;
  line-height: 1;
}

.hp-domain-widget__cart-list {
  max-height: 370px;
  margin: 0;
  padding: 24px 30px;
  overflow: auto;
  list-style: none;
}

.hp-domain-widget__cart-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.hp-domain-widget__cart-item:not(:last-child) {
  margin-bottom: 40px;
}

.hp-domain-widget__cart-item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -20px;
  width: 100%;
  height: 1px;
  background: #dadde5;
}

.hp-domain-widget__cart-item-left {
  min-width: 0;
}

.hp-domain-widget__cart-item-left p {
  margin: 0;
  color: #333;
  font-family: "Exo 2", sans-serif;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
  word-break: break-word;
}

.hp-domain-widget__cart-item-left p span {
  color: #2775df;
}

.hp-domain-widget__cart-item-left small {
  display: block;
  color: #606875;
  font-size: 11px;
  line-height: 1.2;
}

.hp-domain-widget__cart-item-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 0 0 auto;
}

.hp-domain-widget__cart-item-right strong {
  color: #333;
  font-size: 20px;
  font-weight: 600;
  white-space: nowrap;
}

.hp-domain-widget__cart-item-right button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 3px;
  background: #f3f3f3;
  color: var(--gray-icons, #aeb5c2);
  cursor: pointer;
  transition: color 250ms linear;
}

.hp-domain-widget__cart-item-right button:hover,
.hp-domain-widget__cart-item-right button:focus {
  color: #cc101c;
}

.hp-domain-widget__cart-item-right button svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.hp-domain-widget__cart-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 30px;
  border-top: 1px solid #dadde5;
  background: #f3f3f3;
}

.hp-domain-widget__cart-total {
  display: flex;
  flex-direction: column;
}

.hp-domain-widget__cart-total span {
  color: #606875;
  font-size: 13px;
}

.hp-domain-widget__cart-total strong {
  color: #26324d;
  font-size: 36px;
  font-weight: 600;
  line-height: 1.2;
}

.hp-domain-widget__cart-order {
  min-width: 200px;
  min-height: 50px;
  border: 0;
  border-radius: 3px;
  background: #ffa800;
  color: #fff;
  cursor: pointer;
  font-size: 16px;
}

@media (max-width: 991.98px) {
  .hp-domain-widget__hero {
    min-height: 210px;
    padding: 54px 20px 42px;
  }

  .hp-domain-widget__title {
    font-size: 32px;
  }

  .hp-domain-widget__subtitle {
    font-size: 18px;
  }

  .hp-domain-widget__form {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    margin-top: 42px;
    padding: 18px;
  }

  .hp-domain-widget__input-wrap {
    width: 100%;
    gap: 14px;
    min-height: 48px;
    padding-bottom: 12px;
    border: 0 !important;
    border-bottom: 1px solid #dadde5 !important;
    background: transparent;
    box-shadow: none;
    outline: 0;
  }

  .hp-domain-widget__zone-icon {
    flex-basis: 42px;
    margin-left: 0;
  }

  .hp-domain-widget__submit {
    flex-basis: auto;
    width: 100%;
  }

  .hp-domain-widget__error {
    left: 18px;
    bottom: -26px;
  }

  .hp-domain-widget__results {
    font-size: 16px;
  }

  .hp-domain-widget__results-controls,
  .hp-domain-widget__results-list-wrap {
    padding: 18px;
  }

  .hp-domain-widget__result-card {
    align-items: flex-start;
    gap: 18px;
    padding: 18px 0;
  }

  .hp-domain-widget__result-content {
    gap: 14px;
  }

  .hp-domain-widget__status-icon {
    flex-basis: 42px;
    width: 42px;
    height: 42px;
  }

  .hp-domain-widget__add {
    flex-basis: 44px;
    width: 44px;
  }

  .hp-domain-widget__continue {
    min-width: 110px;
  }

  .hp-domain-widget__cart-dialog {
    height: calc(100vh - 24px);
  }

  .hp-domain-widget__cart-footer,
  .hp-domain-widget__cart-item {
    align-items: stretch;
    flex-direction: column;
  }

  .hp-domain-widget__cart-order {
    width: 100%;
  }

  .hp-domain-widget__modal {
    padding: 12px;
  }

  .hp-domain-widget__modal-header,
  .hp-domain-widget__modal-body,
  .hp-domain-widget__modal-footer {
    padding-right: 18px;
    padding-left: 18px;
  }

  .hp-domain-widget__modal-toolbar,
  .hp-domain-widget__modal-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .hp-domain-widget__modal-toolbar label {
    max-width: none;
  }

  .hp-domain-widget__modal-actions {
    flex-direction: column-reverse;
  }

  .hp-domain-widget__modal-primary,
  .hp-domain-widget__modal-secondary {
    width: 100%;
  }
}

@media (max-width: 575.98px) {
  .hp-domain-widget {
    margin-top: 20px;
    padding-bottom: 52px;
  }

  .hp-domain-widget__hero {
    min-height: 180px;
    padding: 42px 18px 34px;
  }

  .hp-domain-widget__title {
    font-size: 28px;
  }

  .hp-domain-widget__subtitle {
    margin-top: 14px;
    font-size: 16px;
  }

  .hp-domain-widget__form {
    width: calc(100% - 24px);
    margin-top: 30px;
    padding: 14px 18px;
  }

  .hp-domain-widget__input-wrap {
    gap: 12px;
    padding-bottom: 10px;
  }

  .hp-domain-widget__search-icon {
    flex-basis: 26px;
    width: 26px;
    height: 26px;
  }

  .hp-domain-widget__globe-icon {
    width: 30px;
    height: 30px;
  }

  .hp-domain-widget__input {
    font-size: 17px;
  }

  .hp-domain-widget__results {
    width: calc(100% - 24px);
  }

  .hp-domain-widget__result-card {
    flex-direction: column;
  }

  .hp-domain-widget__cart-action,
  .hp-domain-widget__added-actions,
  .hp-domain-widget__continue {
    width: 100%;
  }

  .hp-domain-widget__cart-action.is-in-cart .hp-domain-widget__added-actions {
    display: flex;
  }

  .hp-domain-widget__open-cart {
    flex: 0 0 56px;
  }
}
