.content-gate-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.content-gate-modal.is-open {
  display: flex;
}

.content-gate-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 15, 25, 0.72);
  backdrop-filter: blur(4px);
}

.content-gate-modal__panel {
  position: relative;
  width: min(100%, 620px);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: clamp(24px, 5vw, 44px);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  direction: rtl;
}

.content-gate-modal__title {
  margin: 0 0 12px;
  color: #172033;
  font-size: clamp(1.35rem, 4vw, 2rem);
  line-height: 1.5;
}

.content-gate-modal__description {
  margin: 0 0 24px;
  color: #5d6678;
  line-height: 1.9;
}

.content-gate-modal__form .gform_heading {
  display: none;
}

.content-gate-modal__form .gform_wrapper {
  --gate-field-border: #dfe5ec;
  --gate-field-focus: #209df5;
  --gate-error: #c92a3f;
  margin: 24px 0 0;
  font-family: inherit;
  text-align: right;
}

.content-gate-modal__form .gform_wrapper,
.content-gate-modal__form .gform_wrapper * {
  box-sizing: border-box;
}

.content-gate-modal__form .gform_fields {
  display: grid;
  gap: 18px;
}

.content-gate-modal__form .gfield {
  min-width: 0;
  margin: 0;
}

.content-gate-modal__form .gfield_label,
.content-gate-modal__form .gform-field-label {
  display: inline-block;
  margin: 0 0 7px;
  color: #202938;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.8;
}

.content-gate-modal__form .gfield_required {
  margin-right: 4px;
  color: var(--gate-error);
}

.content-gate-modal__form .gfield_description,
.content-gate-modal__form .ginput_complex label,
.content-gate-modal__form .gform_fileupload_rules {
  display: block;
  margin-top: 6px;
  color: #687386;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.8;
}

.content-gate-modal__form .ginput_complex {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.content-gate-modal__form .ginput_complex > span {
  flex: 1 1 180px;
}

.content-gate-modal__form input:not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.content-gate-modal__form select,
.content-gate-modal__form textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 11px 14px;
  color: #171d28;
  background-color: #fff;
  border: 1px solid var(--gate-field-border);
  border-radius: 9px;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.03);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.7;
  text-align: right;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.content-gate-modal__form input::placeholder,
.content-gate-modal__form textarea::placeholder {
  color: #9aa3b1;
  opacity: 1;
}

.content-gate-modal__form textarea {
  min-height: 120px;
  resize: vertical;
}

.content-gate-modal__form select {
  padding-left: 42px;
  background-image:
    linear-gradient(45deg, transparent 50%, #697386 50%),
    linear-gradient(135deg, #697386 50%, transparent 50%);
  background-position: left 20px center, left 14px center;
  background-repeat: no-repeat;
  background-size: 6px 6px, 6px 6px;
  appearance: none;
}

.content-gate-modal__form input[type="file"] {
  padding: 7px;
  background: #f7f9fc;
}

.content-gate-modal__form input[type="file"]::file-selector-button {
  min-height: 34px;
  margin-left: 10px;
  padding: 6px 12px;
  color: #333;
  background: #fff;
  border: 1px solid #d7dce3;
  border-radius: 6px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.content-gate-modal__form input:not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]):focus,
.content-gate-modal__form select:focus,
.content-gate-modal__form textarea:focus {
  background-color: #fff;
  border-color: var(--gate-field-focus);
  box-shadow: 0 0 0 3px rgba(32, 157, 245, 0.14);
  outline: none;
}

.content-gate-modal__form .gfield_checkbox,
.content-gate-modal__form .gfield_radio {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.content-gate-modal__form .gchoice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #e9edf2;
  border-radius: 8px;
}

.content-gate-modal__form input[type="checkbox"],
.content-gate-modal__form input[type="radio"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  accent-color: var(--gate-field-focus);
}

.content-gate-modal__form .gchoice label {
  flex: 1;
  margin: 0;
  color: #343b47;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.8;
}

.content-gate-modal__form .gform_footer,
.content-gate-modal__form .gform_page_footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 22px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid #edf0f3;
}

.content-gate-modal__form input[type="submit"],
.content-gate-modal__form input[type="button"],
.content-gate-modal__form input[type="reset"],
.content-gate-modal__form button:not(.gform_delete_file) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 130px;
  min-height: 46px;
  margin: 0;
  padding: 10px 22px;
  color: #fff;
  background: #209df5;
  border: 1px solid #209df5;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(32, 157, 245, 0.2);
  font-family: inherit;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.content-gate-modal__form input[type="submit"]:hover,
.content-gate-modal__form input[type="button"]:hover,
.content-gate-modal__form button:not(.gform_delete_file):hover {
  background: #168ce0;
  border-color: #168ce0;
  box-shadow: 0 10px 22px rgba(32, 157, 245, 0.26);
  transform: translateY(-1px);
}

.content-gate-modal__form input[type="submit"]:focus-visible,
.content-gate-modal__form input[type="button"]:focus-visible,
.content-gate-modal__form button:not(.gform_delete_file):focus-visible {
  outline: 3px solid rgba(32, 157, 245, 0.25);
  outline-offset: 3px;
}

.content-gate-modal__form .gform_previous_button,
.content-gate-modal__form input[type="reset"] {
  color: #333;
  background: #fff;
  border-color: #d7dce3;
  box-shadow: none;
}

.content-gate-modal__form .gform_ajax_spinner {
  width: 24px;
  height: 24px;
  margin: 0 8px;
}

.content-gate-modal__form .gform_validation_errors,
.content-gate-modal__form .validation_message {
  color: var(--gate-error);
  background: #fff5f6;
  border: 1px solid #f1c7ce;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.9;
}

.content-gate-modal__form .gform_validation_errors {
  margin: 0 0 18px;
  padding: 13px 15px;
}

.content-gate-modal__form .validation_message {
  margin-top: 7px;
  padding: 8px 10px;
}

.content-gate-modal__form .gfield_error input:not([type="checkbox"]):not([type="radio"]),
.content-gate-modal__form .gfield_error select,
.content-gate-modal__form .gfield_error textarea {
  border-color: var(--gate-error);
}

.content-gate-modal__form .gform_confirmation_wrapper,
.content-gate-modal__form .gform_confirmation_message {
  padding: 18px;
  color: #185b3a;
  background: #f1fbf6;
  border: 1px solid #bfe7d1;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 700;
  line-height: 2;
}

.content-gate-modal__error,
.content-gate-inline-error {
  padding: 14px 16px;
  border-radius: 12px;
  background: #fff1f1;
  color: #9b1c1c;
  line-height: 1.8;
}

.content-gate-modal__technical {
  color: #5d6678;
  font-size: 0.9rem;
  line-height: 1.8;
}

.has-content-gate-modal {
  overflow: hidden !important;
}

.content-gate-placeholder {
  display: grid;
  min-height: 220px;
  place-items: center;
  margin-top: 24px;
  padding: 32px;
  border: 1px dashed rgba(23, 32, 51, 0.22);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.55);
  color: #5d6678;
  text-align: center;
}

[data-content-gate-card][aria-busy="true"],
[data-content-gate-slot][aria-busy="true"] {
  opacity: 0.65;
  pointer-events: none;
}

@media (max-width: 640px) {
  .content-gate-modal {
    align-items: flex-end;
    padding: 0;
  }

  .content-gate-modal__panel {
    width: 100%;
    max-height: 92vh;
    padding: 24px 18px max(24px, env(safe-area-inset-bottom));
    border-radius: 22px 22px 0 0;
  }

  .content-gate-modal__form input[type="submit"],
  .content-gate-modal__form input[type="button"],
  .content-gate-modal__form input[type="reset"],
  .content-gate-modal__form button:not(.gform_delete_file) {
    width: 100%;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .content-gate-modal.is-open .content-gate-modal__panel {
    animation: aramesh-content-gate-in 180ms ease-out;
  }

  @keyframes aramesh-content-gate-in {
    from {
      opacity: 0;
      transform: translateY(18px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
