/**
 * WordPress / Contact Form 7 compatibility for the Veridion design.
 * (style.css is the original design file and stays untouched.)
 */

/* CF7 wraps each control in a span */
.contact-form .wpcf7-form-control-wrap {
  display: block;
}

.contact-form .hidden-fields-container,
.contact-form fieldset.hidden-fields-container {
  display: none;
}

.contact-form .wpcf7-not-valid {
  border-color: #f87171 !important;
}

.contact-form .wpcf7-not-valid-tip {
  display: block;
  margin-top: 6px;
  font-size: 12.5px;
  color: #f87171;
}

.contact-form .wpcf7-spinner {
  display: none;
}

.contact-form.submitting .wpcf7-spinner {
  display: inline-block;
  margin: 0 auto;
}

.wpcf7 form.contact-form .wpcf7-response-output {
  margin: 0;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  font-size: 13.5px;
  color: var(--text);
}

.wpcf7 form.contact-form.init .wpcf7-response-output,
.wpcf7 form.contact-form.resetting .wpcf7-response-output,
.wpcf7 form.contact-form.submitting .wpcf7-response-output {
  display: none;
}

.wpcf7 form.contact-form.sent .wpcf7-response-output {
  border-color: #10B981;
}

.wpcf7 form.contact-form.invalid .wpcf7-response-output,
.wpcf7 form.contact-form.failed .wpcf7-response-output,
.wpcf7 form.contact-form.spam .wpcf7-response-output,
.wpcf7 form.contact-form.aborted .wpcf7-response-output {
  border-color: #f87171;
}

.modal-box .contact-form {
  margin-top: 18px;
  text-align: left;
}

/* Avatar image for team members (when a featured image is set) */
.leader-avatar img {
  display: block;
}

/* Scroll to top button */
.vd-to-top {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 190;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: rgba(19, 30, 54, 0.82);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 30px -8px rgba(14, 165, 233, 0.45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.9);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.vd-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.vd-to-top:hover,
.vd-to-top:focus-visible {
  border-color: rgba(14, 165, 233, 0.6);
  box-shadow: 0 16px 36px -10px rgba(14, 165, 233, 0.7), var(--glow-cyan);
  outline: none;
}

.vd-to-top:hover .vd-to-top-arrow {
  transform: translateY(-3px);
}

.vd-to-top-ring {
  position: absolute;
  inset: 1px;
  width: calc(100% - 2px);
  height: calc(100% - 2px);
  transform: rotate(-90deg);
}

.vd-to-top-track {
  fill: none;
  stroke: rgba(148, 163, 184, 0.14);
  stroke-width: 2.5;
}

.vd-to-top-progress {
  fill: none;
  stroke: url(#vdToTopGrad);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 0.15s linear;
}

.vd-to-top-arrow {
  position: relative;
  width: 20px;
  height: 20px;
  color: #38BDF8;
  transition: transform 0.3s ease;
}

@media (max-width: 768px) {
  .vd-to-top {
    right: 18px;
    bottom: 18px;
    width: 46px;
    height: 46px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vd-to-top,
  .vd-to-top-arrow,
  .vd-to-top-progress {
    transition: none;
  }
}
