/* Premium form-card styling shared by Contact and Get-a-Quote — an elevated
   card with an accent top border, icon-badge info cards with hover-lift
   (same idiom as .feature-card), and a glowing input focus state. */

/* Soft ambient glow behind the whole Contact section — Contact-page only
   class, so this is safe to scope broadly. */
.contact.section {
  position: relative;
  overflow: clip;
}

.contact.section::before,
.contact.section::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}

.contact.section::before {
  top: -80px;
  right: 8%;
  width: 340px;
  height: 340px;
  background: color-mix(in srgb, var(--accent-color), transparent 88%);
}

.contact.section::after {
  bottom: -60px;
  left: -60px;
  width: 280px;
  height: 280px;
  background: color-mix(in srgb, var(--heading-color), transparent 93%);
}

/* Auto-fit grid for the Contact page's info cards — evenly distributes
   whichever number of cards is active (3 without Business Hours set, 4
   with it) instead of Bootstrap's fixed col-lg-3 leaving a dangling gap
   when there are only 3. */
.contact-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.info-card {
  background: var(--surface-color);
  border-radius: 14px;
  padding: 26px 22px;
  height: 100%;
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 92%);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.info-card:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--accent-color), transparent 60%);
  box-shadow: 0 14px 30px color-mix(in srgb, var(--default-color), transparent 90%);
}

.info-card .info-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent-color), transparent 88%);
  color: var(--accent-color);
  font-size: 22px;
  margin-bottom: 14px;
  transition: background 0.3s ease, color 0.3s ease;
}

.info-card .info-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid var(--accent-color);
  animation: info-icon-pulse 2.4s ease-out infinite;
}

.info-card:hover .info-icon {
  background: var(--accent-color);
  color: #fff;
}

@keyframes info-icon-pulse {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  100% {
    transform: scale(1.45);
    opacity: 0;
  }
}

.info-card h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.info-card p {
  margin-bottom: 0;
  color: color-mix(in srgb, var(--default-color), transparent 25%);
}

/* Elevated form card */
.premium-form-card {
  position: relative;
  background: var(--surface-color);
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 20px 45px color-mix(in srgb, var(--default-color), transparent 92%);
  overflow: hidden;
}

.premium-form-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, var(--accent-color), color-mix(in srgb, var(--accent-color), #fff 40%));
}

.premium-form-card .form-control,
.premium-form-card textarea.form-control,
.premium-form-card select.form-control {
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 85%);
  padding: 0.75rem 1rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.premium-form-card .form-control:focus,
.premium-form-card select.form-control:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-color), transparent 82%);
}

.premium-form-card button[type="submit"] {
  border-radius: 30px;
  padding: 12px 34px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.premium-form-card button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px color-mix(in srgb, var(--accent-color), transparent 65%);
}

/* While a submission is in flight, validate.js disables the button, swaps
   its label for a spinner + "Sending..." (instead of the vendor theme's
   separate floating "Loading" toast), and this keeps that state visually
   clear rather than relying on the browser's own (barely noticeable, on a
   custom-colored button) disabled default. */
.premium-form-card button[type="submit"]:disabled {
  opacity: 0.85;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.premium-form-card button[type="submit"]:disabled::after {
  animation-play-state: paused;
  opacity: 0;
}

.btn-spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  vertical-align: -2px;
  border: 2px solid rgb(255 255 255 / 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spinner-spin 0.7s linear infinite;
}

@keyframes btn-spinner-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn-spinner {
    animation-duration: 1.4s;
  }
}

.premium-form-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-color);
  margin-bottom: 10px;
}

@media (max-width: 575px) {
  .premium-form-card {
    padding: 26px 20px;
  }
}

/* "I agree to the Terms..." consent checkbox, shared by Contact and
   Get-a-Quote. A plain checkbox (not a custom-drawn one) so it stays fully
   native/accessible — just recoloured to the accent on check/focus. */
.form-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 2px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: color-mix(in srgb, var(--default-color), transparent 20%);
  cursor: pointer;
}

.form-consent input[type="checkbox"] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent-color);
  cursor: pointer;
}

.form-consent a {
  color: var(--accent-color);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* reCAPTCHA v3 (Contact + Get-a-Quote, Admin → Site Settings → reCAPTCHA).
   It's invisible — runs on submit, no checkbox — so Google's own floating
   badge is the only visible trace, and it would otherwise sit right under
   this theme's own floating WhatsApp/call/social dock in the same corner.
   Hiding it is allowed as long as the required attribution text below
   replaces it, which every page that loads the widget includes. */
.grecaptcha-badge {
  visibility: hidden;
}

.form-recaptcha-note {
  margin: 10px 0 0;
  font-size: 0.75rem;
  line-height: 1.5;
  color: color-mix(in srgb, var(--default-color), transparent 45%);
}

.form-recaptcha-note a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Flash toast — the vendor form script (validate.js) only ever toggles the
   .d-block class on these; everything else (the fixed position, slide/fade
   entrance, and timed auto-dismiss) is done here in pure CSS so no JS
   changes were needed. */
.premium-form-card .loading,
.premium-form-card .error-message,
.premium-form-card .sent-message {
  position: fixed;
  left: auto;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  max-width: min(360px, calc(100vw - 40px));
  margin: 0;
  border-radius: 12px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
}

.premium-form-card .sent-message,
.premium-form-card .error-message {
  display: none;
}

.premium-form-card .sent-message.d-block,
.premium-form-card .error-message.d-block {
  display: flex !important;
  align-items: center;
  gap: 10px;
  animation: toast-flash 4.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.premium-form-card .sent-message.d-block::before {
  content: "\f26b";
  font-family: "bootstrap-icons";
  font-size: 18px;
}

.premium-form-card .error-message.d-block::before {
  content: "\f335";
  font-family: "bootstrap-icons";
  font-size: 18px;
}

@keyframes toast-flash {
  0% {
    transform: translateY(30px);
    opacity: 0;
  }
  10%, 88% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(30px);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .info-card .info-icon::after {
    animation: none;
    display: none;
  }

  .premium-form-card .sent-message.d-block,
  .premium-form-card .error-message.d-block {
    animation: none;
  }
}

/* Map, matching the .world-map-wrap rounded/shadowed container language.
   Sits side-by-side with the form card, so it gets the same min-height
   rather than the old fixed 320px that made it look squat next to a
   taller form. */
.premium-map-wrap {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 14px 34px color-mix(in srgb, var(--default-color), transparent 90%);
  min-height: 320px;
}

.premium-map-wrap iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 320px;
  border: 0;
}

@media (max-width: 991px) {
  .premium-map-wrap {
    min-height: 380px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .info-card,
  .info-card:hover,
  .premium-form-card button[type="submit"],
  .premium-form-card button[type="submit"]:hover {
    transform: none;
  }
}
