.agcf,
.agcf * {
  box-sizing: border-box;
}

.agcf {
  --agcf-blue: #241ae8;
  --agcf-black: #000;
  --agcf-gray: #626363;
  --agcf-line: #dfe1e6;
  --agcf-soft: #f6f7f9;
  width: 100%;
  color: var(--agcf-black);
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

.agcf__title {
  margin: 0 0 24px;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}
.agcf__form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.agcf__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.agcf__field {
  min-width: 0;
}
.agcf__field label {
  display: block;
  margin: 0 0 8px;
  color: #111;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.35;
}
.agcf__field label span {
  color: var(--agcf-blue);
}
.agcf__field label small {
  color: var(--agcf-gray);
  font-size: 12px;
  font-weight: 500;
}

.agcf input,
.agcf select,
.agcf textarea {
  width: 100%;
  min-height: 52px;
  margin: 0;
  border: 1px solid var(--agcf-line);
  border-radius: 2px;
  outline: 0;
  background: #fff;
  box-shadow: none;
  color: #0b0b0c;
  font: inherit;
  font-size: 15px;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.agcf input,
.agcf select {
  padding: 0 15px;
}
.agcf textarea {
  min-height: 150px;
  padding: 14px 15px;
  resize: vertical;
  line-height: 1.6;
}
.agcf input::placeholder,
.agcf textarea::placeholder {
  color: #8a8e96;
  opacity: 1;
}
.agcf input:hover,
.agcf select:hover,
.agcf textarea:hover {
  border-color: #b9bdc7;
}
.agcf input:focus,
.agcf select:focus,
.agcf textarea:focus {
  border-color: var(--agcf-blue);
  box-shadow: 0 0 0 3px rgba(36, 26, 232, 0.1);
}
.agcf [aria-invalid="true"] {
  border-color: #c62828 !important;
  box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.1) !important;
}

.agcf__phone {
  display: grid;
  grid-template-columns: minmax(125px, 42%) minmax(0, 1fr);
}
.agcf__phone select {
  position: relative;
  z-index: 1;
  border-radius: 2px 0 0 2px;
  background-color: var(--agcf-soft);
  font-size: 13px;
}
.agcf__phone input {
  margin-left: -1px;
  border-radius: 0 2px 2px 0;
}
.agcf__hint {
  margin: 8px 0 0;
  color: var(--agcf-gray);
  font-size: 12px;
  line-height: 1.5;
}
.agcf__form > .agcf__hint {
  margin: -14px 0 0;
}

.agcf__file {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 54px;
  overflow: hidden;
  border: 1px dashed #b8bcc5;
  border-radius: 2px;
  background: var(--agcf-soft);
  transition:
    border-color 0.2s,
    background 0.2s;
}
.agcf__file:hover {
  border-color: var(--agcf-blue);
  background: #f2f1ff;
}
.agcf__file input {
  position: absolute;
  inset: 0;
  z-index: 2;
  height: 100%;
  cursor: pointer;
  opacity: 0;
}
.agcf__file span {
  display: block;
  min-width: 0;
  padding: 0 16px 0 48px;
  overflow: hidden;
  color: #45474d;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agcf__file::before {
  content: "+";
  position: absolute;
  left: 16px;
  color: var(--agcf-blue);
  font-size: 25px;
  font-weight: 400;
  line-height: 1;
}

.agcf__submit {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  align-self: flex-start;
  min-width: 190px;
  min-height: 54px;
  padding: 0 20px;
  border: 1px solid var(--agcf-blue);
  border-radius: 2px;
  background: var(--agcf-blue);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition:
    background 0.2s,
    color 0.2s,
    transform 0.2s;
}
.agcf__submit i {
  margin-left: 22px;
  font-size: 21px;
  font-style: normal;
  font-weight: 400;
  transition: transform 0.2s;
}
.agcf__submit:hover {
  background: #1107cc;
  transform: translateY(-1px);
}
.agcf__submit:hover i {
  transform: translateX(3px);
}
.agcf__submit:focus-visible {
  outline: 3px solid rgba(36, 26, 232, 0.22);
  outline-offset: 3px;
}
.agcf__submit:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
}
.agcf__submit.is-loading i {
  animation: agcfPulse 0.8s ease-in-out infinite alternate;
}

.agcf__notice {
  margin: 0 0 20px;
  padding: 14px 16px;
  border-left: 3px solid;
  background: #f5f6f8;
  font-size: 14px;
  line-height: 1.6;
}
.agcf__notice--success {
  border-color: #168545;
  background: #edf8f1;
  color: #0f6233;
}
.agcf__notice--error {
  border-color: #c62828;
  background: #fff1f1;
  color: #8c1d1d;
}
.agcf__hp {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

@keyframes agcfPulse {
  to {
    opacity: 0.25;
  }
}

@media (max-width: 700px) {
  .agcf__form {
    gap: 17px;
  }
  .agcf__grid {
    grid-template-columns: 1fr;
    gap: 17px;
  }
  .agcf__hint {
    margin-top: 8px;
  }
  .agcf__form > .agcf__hint {
    margin-top: -11px;
  }
  .agcf__submit {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .agcf *,
  .agcf *::before,
  .agcf *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
