/**
 * Contact Form 7 — toast notices + clearer missing-field states.
 */

.templateTheme-cf7Toast {
  position: fixed;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: max(16px, env(safe-area-inset-bottom, 0px));
  z-index: 2147483646;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}

body:has(.podcastMini:not([hidden])) .templateTheme-cf7Toast {
  bottom: max(96px, calc(88px + env(safe-area-inset-bottom, 0px)));
}

.templateTheme-cf7Toast__card {
  pointer-events: auto;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 28px;
  align-items: start;
  gap: 12px;
  width: 100%;
  padding: 14px 12px 14px 14px;
  border-radius: 16px;
  background: #1d1d1f;
  color: #fff;
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.06);
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    sans-serif;
  transform: translateY(12px);
  opacity: 0;
  transition:
    opacity 0.32s var(--templateTheme-ease-soft, cubic-bezier(0.33, 1, 0.68, 1)),
    transform 0.32s var(--templateTheme-ease-out, cubic-bezier(0.35, 1, 0.45, 1));
}

.templateTheme-cf7Toast__card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.templateTheme-cf7Toast__card.is-leaving {
  opacity: 0;
  transform: translateY(10px);
}

.templateTheme-cf7Toast__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #ffb4a8;
}

.templateTheme-cf7Toast__card--sent .templateTheme-cf7Toast__icon {
  background: #d8ff89;
  color: #232323;
}

.templateTheme-cf7Toast__icon svg {
  display: block;
  width: 18px;
  height: 18px;
}

.templateTheme-cf7Toast__body {
  min-width: 0;
  padding-top: 2px;
}

.templateTheme-cf7Toast__title {
  margin: 0;
  font-size: 15px;
  font-weight: 550;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.templateTheme-cf7Toast__text {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13.5px;
  font-weight: 350;
  letter-spacing: -0.01em;
  line-height: 1.45;
}

.templateTheme-cf7Toast__fields {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.templateTheme-cf7Toast__fields li {
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
}

.templateTheme-cf7Toast__fields li::before {
  content: "·";
  margin-right: 8px;
  color: #ffb4a8;
}

.templateTheme-cf7Toast__card--sent .templateTheme-cf7Toast__fields li::before {
  color: #d8ff89;
}

.templateTheme-cf7Toast__close {
  width: 28px;
  height: 28px;
  margin: -2px -2px 0 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
}

.templateTheme-cf7Toast__close:hover,
.templateTheme-cf7Toast__close:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.templateTheme-cf7Toast__close:focus-visible {
  outline: 2px solid #d8ff89;
  outline-offset: 1px;
}

.templateTheme-cf7Toast__close svg {
  display: block;
  width: 14px;
  height: 14px;
  margin: 0 auto;
}

/* Hide the default CF7 status line — the toast replaces it visually. */
.wpcf7 form .wpcf7-response-output,
.wpcf7-form + .wpcf7-response-output {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Missing / invalid fields */

.wpcf7-form .wpcf7-form-control-wrap:has(.wpcf7-not-valid),
.wpcf7-form .wpcf7-form-control-wrap:has(.wpcf7-not-valid-tip) {
  position: relative;
}

.wpcf7-form :is(input, textarea, select).wpcf7-not-valid {
  animation: templateTheme-cf7-shake 0.42s var(--templateTheme-ease-out, cubic-bezier(0.35, 1, 0.45, 1));
}

.wpcf7-form
  :is(
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="url"],
    input[type="number"],
    input[type="date"],
    input[type="quiz"],
    textarea,
    select
  ).wpcf7-not-valid {
  border-color: #c62828;
  box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.16);
}

.paketConfigurator__cf7 .paketConfigurator__field:has(.wpcf7-not-valid),
.paketConfigurator__cf7 .paketConfigurator__field:has(.wpcf7-not-valid-tip) {
  padding: 10px 12px;
  margin: -10px -12px;
  border-radius: 14px;
  background: rgba(198, 40, 40, 0.05);
}

.paketConfigurator__cf7 .paketConfigurator__filewrap:has(input.wpcf7-not-valid)
  .paketConfigurator__file-btn {
  background: #8f1f1f;
}

.wpcf7-not-valid-tip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  max-width: 100%;
  margin-top: 8px;
  padding: 6px 10px 6px 8px;
  border-radius: 8px;
  background: #fdecea;
  color: #8f1f1f;
  font-size: 13px;
  font-weight: 450;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.wpcf7-not-valid-tip::before {
  content: "";
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Ccircle cx='8' cy='8' r='6.25' stroke='black' stroke-width='1.5'/%3E%3Cpath d='M8 5v3.4' stroke='black' stroke-width='1.5' stroke-linecap='round'/%3E%3Ccircle cx='8' cy='11' r='0.85' fill='black'/%3E%3C/svg%3E")
    center / 16px 16px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Ccircle cx='8' cy='8' r='6.25' stroke='black' stroke-width='1.5'/%3E%3Cpath d='M8 5v3.4' stroke='black' stroke-width='1.5' stroke-linecap='round'/%3E%3Ccircle cx='8' cy='11' r='0.85' fill='black'/%3E%3C/svg%3E")
    center / 16px 16px no-repeat;
}

.faqBlock__form .wpcf7-not-valid-tip,
.faqBlock--light .faqBlock__form .wpcf7-not-valid-tip {
  background: rgba(255, 180, 168, 0.16);
  color: #ffb4a8;
}

.faqBlock--light .faqBlock__form .wpcf7-not-valid-tip {
  background: #fdecea;
  color: #8f1f1f;
}

.faqBlock__form :is(input, textarea).wpcf7-not-valid,
.contactBlock__form-wrap :is(input, textarea, select).wpcf7-not-valid {
  border-color: transparent;
  border-bottom-color: #e24b4b;
  box-shadow: 0 2px 0 0 #e24b4b;
}

.faqBlock__form :is(input, textarea).wpcf7-not-valid {
  border-bottom-color: #ffb4a8;
  box-shadow: 0 2px 0 0 #ffb4a8;
}

@keyframes templateTheme-cf7-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-5px);
  }
  40% {
    transform: translateX(4px);
  }
  60% {
    transform: translateX(-3px);
  }
  80% {
    transform: translateX(2px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .wpcf7-form :is(input, textarea, select).wpcf7-not-valid,
  .templateTheme-cf7Toast__card,
  .templateTheme-cf7Toast__card.is-visible,
  .templateTheme-cf7Toast__card.is-leaving {
    animation: none;
    transition: none;
    transform: none;
    opacity: 1;
  }
}
