/* ==========================================================================
   AUTOCENT – vlastní formuláře
   Náhrada WPForms. Vizuálně navazuje na styl webu: Poppins, černá/bílá,
   hranaté tlačítko s 3px rámečkem.
   ========================================================================== */

.ac-form-wrap {
  --ac-border: rgba(0, 0, 0, .25);
  --ac-border-focus: #000;
  --ac-text: rgba(0, 0, 0, .8);
  --ac-muted: rgba(0, 0, 0, .55);
  --ac-error: #b3261e;
  --ac-radius: 3px;
  --ac-gap: 30px;
}

.ac-form {
  margin: 0;
}

.ac-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 20px;
}

.ac-form__field {
  min-width: 0;
  padding: 15px 0;
  grid-column: span 2;
}

@media (min-width: 576px) {
  .ac-form__field--half {
    grid-column: span 1;
  }
}

/* --- popisky ------------------------------------------------------------ */

/* Popisky jsou skryté vizuálně, ne však pro odečítače obrazovky. */
.ac-form .screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ac-form__label--visible {
  display: block;
  margin-bottom: 8px;
  font-size: .95rem;
  font-weight: 500;
  color: #000;
}

/* --- pole --------------------------------------------------------------- */

.ac-form__input {
  display: block;
  width: 100%;
  height: 43px;
  padding: 0 14px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.4;
  color: var(--ac-text);
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid var(--ac-border);
  border-radius: var(--ac-radius);
  outline: 0;
  appearance: none;
  transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.ac-form__textarea {
  height: auto;
  min-height: 120px;
  padding: 12px 14px;
  resize: vertical;
}

.ac-form__input::placeholder {
  color: rgba(0, 0, 0, .38);
  opacity: 1;
}

.ac-form__input:hover {
  border-color: rgba(0, 0, 0, .45);
}

.ac-form__input:focus {
  border-color: var(--ac-border-focus);
  box-shadow: 0 0 0 1px var(--ac-border-focus);
}

.ac-form__input:disabled {
  background-color: #f5f5f5;
  cursor: not-allowed;
}

/* --- chybové stavy ------------------------------------------------------ */

.ac-form__field--invalid .ac-form__input {
  border-color: var(--ac-error);
}

.ac-form__field--invalid .ac-form__input:focus {
  box-shadow: 0 0 0 1px var(--ac-error);
}

.ac-form__error {
  margin: 6px 0 0;
  font-size: .82rem !important;
  font-weight: 400 !important;
  line-height: 1.35rem !important;
  color: var(--ac-error) !important;
}

.ac-form__alert {
  margin-bottom: 4px;
  padding: 12px 16px;
  font-size: .9rem;
  line-height: 1.45;
  color: var(--ac-error);
  background-color: rgba(179, 38, 30, .06);
  border-left: 3px solid var(--ac-error);
}

.ac-form__notice {
  margin: 12px 0 0;
  font-size: .9rem !important;
}

.ac-form__notice--error {
  color: var(--ac-error) !important;
}

/* --- souhlas (checkbox) ------------------------------------------------- */

.ac-form__check {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.ac-form__checkbox {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  background-color: #fff;
  border: 1px solid var(--ac-border);
  border-radius: 0;
  outline: 0;
  appearance: none;
  cursor: pointer;
  transition: background-color .12s ease-in-out, border-color .12s ease-in-out;
}

.ac-form__checkbox:hover {
  border-color: rgba(0, 0, 0, .55);
}

.ac-form__checkbox:checked {
  background-color: #000;
  border-color: #000;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.6' d='m4.5 10.5 3.6 3.6 7.4-8.2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
}

.ac-form__checkbox:focus-visible {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #000;
}

.ac-form__check-label {
  position: absolute;
  top: 0;
  left: 0;
  width: 20px;
  height: 22px;
  margin: 0;
  cursor: pointer;
}

.ac-form__description {
  font-size: .875rem;
  line-height: 1.4;
  color: var(--ac-muted);
}

.ac-form__description a {
  color: #000 !important;
  font-weight: 500 !important;
  text-decoration: underline;
}

.ac-form__field--checkbox.ac-form__field--invalid .ac-form__checkbox {
  border-color: var(--ac-error);
}

/* --- posuvník (financování) --------------------------------------------- */

.ac-form__range {
  display: block;
  width: 100%;
  height: 22px;
  margin: 0;
  padding: 0;
  background: transparent;
  outline: 0;
  appearance: none;
  cursor: pointer;
}

.ac-form__range::-webkit-slider-runnable-track {
  height: 4px;
  background: rgba(0, 0, 0, .15);
  border-radius: 0;
}

.ac-form__range::-moz-range-track {
  height: 4px;
  background: rgba(0, 0, 0, .15);
  border-radius: 0;
}

.ac-form__range::-webkit-slider-thumb {
  width: 20px;
  height: 20px;
  margin-top: -8px;
  background: #000;
  border: 0;
  border-radius: 0;
  appearance: none;
  transition: transform .12s ease-in-out;
}

.ac-form__range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #000;
  border: 0;
  border-radius: 0;
  transition: transform .12s ease-in-out;
}

.ac-form__range:active::-webkit-slider-thumb,
.ac-form__range:focus-visible::-webkit-slider-thumb {
  transform: scale(1.15);
}

.ac-form__range:active::-moz-range-thumb,
.ac-form__range:focus-visible::-moz-range-thumb {
  transform: scale(1.15);
}

.ac-form__range-hint {
  margin-top: 8px;
  font-size: .875rem;
  color: var(--ac-muted);
}

.ac-form__range-hint b {
  color: #000;
  font-weight: 700;
}

/* --- past na roboty ----------------------------------------------------- */

.ac-form__hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --- odeslání ----------------------------------------------------------- */

.ac-form__submit {
  margin-top: 10px;
}

.ac-form__button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 41px;
}

.ac-form__button[disabled] {
  cursor: progress;
  opacity: .75;
}

.ac-form__spinner {
  display: none;
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: ac-form-spin .7s linear infinite;
}

.ac-form--sending .ac-form__spinner {
  display: inline-block;
}

@keyframes ac-form-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .ac-form__spinner { animation-duration: 2s; }
  .ac-form__input,
  .ac-form__checkbox,
  .ac-form__range::-webkit-slider-thumb,
  .ac-form__range::-moz-range-thumb { transition: none; }
}

/* --- poděkování po odeslání --------------------------------------------- */

.ac-form__success {
  padding: 28px 30px;
  color: #fff;
  background: #000;
}

.ac-form__success-heading {
  margin: 0 0 10px;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
}

.ac-form__success-text {
  margin: 0;
  font-size: 1rem !important;
  font-weight: 300 !important;
  line-height: 1.6rem !important;
  color: rgba(255, 255, 255, .85) !important;
}

.ac-form__success-text a {
  color: #fff !important;
  font-weight: 600 !important;
  text-decoration: underline;
}
