.zdrv-product-action {
  margin-top: 18px;
  width: 100%;
}

.zdrv-product-action .zdrv-open-modal,
.zdrv-product-action .zdrv-open-login {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid #d8c7f4;
  border-radius: 8px;
  background: #efe7ff;
  color: #57308f;
  font-weight: 800;
  line-height: 1.5;
  text-align: center;
  box-shadow: 0 8px 20px rgba(111, 66, 193, 0.12);
}

.zdrv-product-action .zdrv-open-modal:hover,
.zdrv-product-action .zdrv-open-modal:focus,
.zdrv-product-action .zdrv-open-login:hover,
.zdrv-product-action .zdrv-open-login:focus {
  border-color: #c6a7ef;
  background: #e6d7ff;
  color: #48257a;
  outline: none;
}

.zdrv-login-note {
  margin: 8px 0 0;
  color: #5d6673;
  font-size: 0.92rem;
}

.zdrv-modal-open {
  overflow: hidden;
}

.zdrv-modal[hidden] {
  display: none;
}

.zdrv-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 24px;
}

.zdrv-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 17, 24, 0.72);
  backdrop-filter: blur(4px);
}

.zdrv-modal__dialog {
  position: relative;
  width: min(620px, 100%);
  max-height: min(820px, calc(100vh - 48px));
  overflow: auto;
  direction: rtl;
  text-align: right;
  background: #ffffff;
  color: #1d2327;
  border-radius: 8px;
  box-shadow: 0 28px 90px rgba(10, 16, 24, 0.32);
  padding: 0;
}

.zdrv-modal__dialog h2 {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.4;
}

.zdrv-modal__topbar {
  display: flex;
  padding: 12px 16px 0;
  background: linear-gradient(135deg, #f7fbff 0%, #ffffff 70%);
}

.zdrv-modal__header {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 14px;
  align-items: start;
  padding: 14px 28px 20px;
  border-bottom: 1px solid #e6eaf0;
  background: linear-gradient(135deg, #f7fbff 0%, #ffffff 54%, #f5faf7 100%);
}

.zdrv-modal__header p {
  margin: 8px 0 0;
  color: #526071;
  font-size: 0.98rem;
  line-height: 1.9;
}

.zdrv-modal__mark {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, #1f7a5b 0%, #2f68b8 100%);
  box-shadow: 0 12px 24px rgba(28, 96, 129, 0.22);
  position: relative;
}

.zdrv-modal__mark::before,
.zdrv-modal__mark::after {
  content: "";
  position: absolute;
  background: #ffffff;
}

.zdrv-modal__mark::before {
  width: 24px;
  height: 3px;
  border-radius: 999px;
  top: 27px;
  right: 15px;
  transform: rotate(-36deg);
}

.zdrv-modal__mark::after {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  top: 15px;
  right: 27px;
}

.zdrv-modal__close {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  margin-inline-start: auto;
  border: 1px solid #d7dde6;
  border-radius: 8px;
  background: #ffffff;
  color: #1f2937;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.zdrv-modal__close:hover,
.zdrv-modal__close:focus {
  border-color: #b8c2d0;
  background: #f8fafc;
  outline: none;
  box-shadow: 0 0 0 3px rgba(47, 104, 184, 0.12);
}

.zdrv-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 18px 28px 0;
}

.zdrv-guide__item {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 8px;
  align-items: start;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fbfcfe;
}

.zdrv-guide__item span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: #e8f3ee;
  color: #176246;
  font-weight: 800;
}

.zdrv-guide__item p {
  margin: 0;
  color: #4b5563;
  font-size: 0.88rem;
  line-height: 1.75;
}

.zdrv-auth {
  display: grid;
  gap: 12px;
  margin: 18px 28px 0;
  padding: 14px;
  border: 1px solid #d7e2ef;
  border-radius: 8px;
  background: #f8fafc;
}

.zdrv-auth[hidden] {
  display: none;
}

.zdrv-auth__header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
}

.zdrv-auth__header strong,
.zdrv-auth__form label {
  display: block;
  color: #1d2327;
  font-weight: 800;
  line-height: 1.7;
}

.zdrv-auth__step {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e8f3ee;
  color: #176246;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.zdrv-auth__header p,
.zdrv-auth__form p {
  margin: 6px 0 0;
  color: #5d6673;
  font-size: 0.9rem;
  line-height: 1.8;
}

.zdrv-auth__form {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
}

.zdrv-auth__form[hidden] {
  display: none;
}

.zdrv-auth__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.zdrv-phone-field,
.zdrv-code-inputs input {
  border: 1px solid #cbd7e6;
  border-radius: 8px;
  background: #ffffff;
  color: #1d2327;
}

.zdrv-phone-field {
  display: grid;
  grid-template-columns: 52px 1fr;
  min-height: 48px;
  overflow: hidden;
}

.zdrv-phone-field span {
  display: grid;
  place-items: center;
  border-left: 1px solid #d8e1ec;
  background: #f1f5f9;
  color: #526071;
  font-weight: 800;
}

.zdrv-auth input[type="tel"],
.zdrv-code-inputs input {
  min-height: 46px;
  font-size: 1rem;
}

.zdrv-auth input[type="tel"] {
  width: 100%;
  direction: ltr;
  padding: 8px 12px;
  border: 0;
  text-align: left;
  box-shadow: none;
}

.zdrv-auth__hint {
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff7ed;
  color: #8a4b0f;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.8;
}

.zdrv-auth__code-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
}

.zdrv-auth__code-head p {
  margin: 3px 0 0;
}

.zdrv-code-inputs {
  display: grid;
  grid-template-columns: repeat(4, 58px);
  gap: 12px;
  justify-content: end;
}

.zdrv-code-inputs input {
  width: 58px;
  min-height: 54px;
  text-align: center;
  font-size: 1.55rem;
  font-weight: 800;
}

.zdrv-phone-field:focus-within,
.zdrv-code-inputs input:focus {
  border-color: #2f68b8;
  outline: none;
  box-shadow: 0 0 0 3px rgba(47, 104, 184, 0.14);
}

.zdrv-auth__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.zdrv-form {
  display: grid;
  gap: 12px;
  margin: 18px 28px 0;
  padding: 16px;
  border: 1px solid #d8e1ec;
  border-radius: 8px;
  background: #ffffff;
}

.zdrv-form[hidden] {
  display: none;
}

.zdrv-form label,
.zdrv-form__label {
  font-weight: 700;
}

.zdrv-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.zdrv-picker__option {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 94px;
  padding: 12px;
  border: 1px solid #cbd7e6;
  border-radius: 8px;
  background: #f8fbff;
  color: #1d2939;
  cursor: pointer;
  text-align: right;
}

.zdrv-picker__option:hover,
.zdrv-picker__option:focus {
  border-color: #2f68b8;
  background: #f2f8ff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(47, 104, 184, 0.14);
}

.zdrv-picker__option:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.zdrv-picker__icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 8px;
  background: #e8f3ee;
  color: #176246;
}

.zdrv-picker__icon svg {
  display: block;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.zdrv-picker__text {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.zdrv-picker__option strong {
  font-size: 0.95rem;
  line-height: 1.5;
}

.zdrv-picker__option small {
  display: block;
  color: #5d6673;
  font-size: 0.82rem;
  line-height: 1.6;
}

.zdrv-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.zdrv-selected-file {
  min-height: 22px;
  margin: 0;
  color: #187044;
  font-size: 0.9rem;
  font-weight: 700;
}

.zdrv-selected-file[data-has-file="0"] {
  display: none;
}

.zdrv-submit {
  justify-self: start;
  min-height: 42px;
}

.zdrv-status {
  min-height: 24px;
  margin: 16px 28px 0;
  font-size: 0.95rem;
}

.zdrv-status[data-tone="loading"] {
  color: #3451a4;
}

.zdrv-status[data-tone="success"] {
  color: #187044;
}

.zdrv-status[data-tone="error"] {
  color: #b42318;
}

.zdrv-result {
  display: grid;
  gap: 14px;
  margin: 12px 28px 28px;
}

.zdrv-result img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid #d7dde6;
}

.zdrv-loader {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 14px;
  align-items: center;
  margin: 18px 28px 0;
  padding: 16px;
  border: 1px solid #c7ddf4;
  border-radius: 8px;
  background: #f6fbff;
}

.zdrv-loader[hidden] {
  display: none;
}

.zdrv-loader__ring {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 4px solid #d6e9fb;
  border-top-color: #2f68b8;
  border-left-color: #1f7a5b;
  animation: zdrv-spin 1s linear infinite;
}

.zdrv-loader__content {
  display: grid;
  gap: 6px;
}

.zdrv-loader__title {
  color: #18324a;
  font-size: 1rem;
  line-height: 1.6;
}

.zdrv-loader__body,
.zdrv-loader__note {
  margin: 0;
  color: #435266;
  line-height: 1.8;
  font-size: 0.92rem;
}

.zdrv-loader__note {
  color: #94550b;
  font-weight: 700;
}

@keyframes zdrv-spin {
  to {
    transform: rotate(360deg);
  }
}

.zdrv-account-link {
  justify-self: start;
}

.zdrv-feedback {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #d7dde6;
  border-radius: 8px;
  background: #f8fafc;
}

.zdrv-inline-feedback {
  display: grid;
  gap: 8px;
  max-width: 280px;
}

.zdrv-feedback__question,
.zdrv-feedback__saved,
.zdrv-feedback__error {
  margin: 0;
}

.zdrv-feedback__question {
  font-weight: 700;
}

.zdrv-feedback__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.zdrv-feedback__reason {
  display: grid;
  gap: 8px;
}

.zdrv-feedback__reason[hidden] {
  display: none;
}

.zdrv-feedback__reason textarea {
  width: 100%;
  min-height: 86px;
  padding: 10px;
  border: 1px solid #ccd5df;
  border-radius: 8px;
  resize: vertical;
}

.zdrv-inline-feedback .zdrv-feedback__reason textarea {
  min-height: 72px;
}

.zdrv-feedback__saved {
  color: #187044;
  font-weight: 700;
}

.zdrv-feedback__error {
  color: #b42318;
}

.zdrv-muted {
  color: #5d6673;
}

.zdrv-account h2 {
  margin-bottom: 18px;
}

.zdrv-designs-table .zdrv-result-link {
  display: inline-block;
}

.zdrv-designs-table img {
  display: block;
  width: 96px;
  height: 72px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #d7dde6;
}

@media (max-width: 600px) {
  .zdrv-modal {
    padding: 12px;
  }

  .zdrv-modal__dialog {
    max-height: calc(100vh - 24px);
  }

  .zdrv-modal__topbar {
    padding: 10px 12px 0;
  }

  .zdrv-modal__header {
    grid-template-columns: 1fr;
    padding: 12px 16px 16px;
  }

  .zdrv-modal__mark {
    width: 46px;
    height: 46px;
  }

  .zdrv-guide {
    grid-template-columns: 1fr;
    padding: 14px 16px 0;
  }

  .zdrv-form,
  .zdrv-auth,
  .zdrv-loader,
  .zdrv-status,
  .zdrv-result {
    margin-right: 16px;
    margin-left: 16px;
  }

  .zdrv-auth__row {
    grid-template-columns: 1fr;
  }

  .zdrv-auth__header,
  .zdrv-auth__code-head {
    grid-template-columns: 1fr;
  }

  .zdrv-auth__row .button,
  .zdrv-auth__actions .button {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .zdrv-code-inputs {
    grid-template-columns: repeat(4, minmax(44px, 1fr));
  }

  .zdrv-code-inputs input {
    width: 100%;
  }

  .zdrv-submit,
  .zdrv-account-link {
    justify-self: stretch;
    text-align: center;
  }

  .zdrv-picker {
    grid-template-columns: 1fr;
  }

  .zdrv-designs-table img {
    width: 100%;
    max-width: 180px;
    height: auto;
    aspect-ratio: 4 / 3;
  }
}
