/* ======================================================
   GLOBAL FIXES
   ====================================================== */

/* Prevent mobile horizontal scroll */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

/* Ensure all images and embeds scale down */
img, video, iframe {
  max-width: 100%;
  height: auto;
}

/* Stop wide sections from overflowing */
.container, .site-content, .entry-content, .page-content {
  max-width: 100%;
  box-sizing: border-box;
}

/* Fix WordPress block alignments */
.wp-block-image, .wp-block-embed, .wp-block-cover, .wp-block-group {
  max-width: 100%;
}

/* Allow long words/links to wrap on mobile */
p, a, span, h1, h2, h3, h4, h5, h6 {
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* Keep front-end widths consistent with editor */
.book-an-appointment-form .wp-block-jetpack-contact-form,
.book-an-appointment-form .entry-content > * {
  max-width: var(--wp--style--global--content-size, 720px);
  margin-left: auto;
  margin-right: auto;
}

/* ======================================================
   BOOK APPOINTMENT FORM (CLEAN, HIGH-CONTRAST)
   ====================================================== */

.book-an-appointment-form {
  --aac-radius: 12px;
  --aac-border-color: #334155; /* darker border for readability */
  --aac-border: 2px solid var(--aac-border-color);
  --aac-focus-ring: 0 0 0 3px rgba(3, 105, 161, .45); /* accessible blue focus */
  --aac-fg: #0b1220;
  --aac-muted: #475569;
}

/* Remove weird outer box/border */
.book-an-appointment-form .wp-block-jetpack-contact-form,
.book-an-appointment-form .contact-form {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  max-width: 780px;
  margin: 0 auto;
}

/* spacing between fields */
.book-an-appointment-form .wp-block-jetpack-contact-form > div,
.book-an-appointment-form .contact-form > div {
  margin-bottom: 16px;
}

/* labels */
.book-an-appointment-form label {
  display: inline-block;
  margin-bottom: 6px;
  font-weight: 700;
  font-size: 16px;
  color: var(--aac-fg);
}

/* inputs + textarea */
.book-an-appointment-form input[type="text"],
.book-an-appointment-form input[type="email"],
.book-an-appointment-form input[type="tel"],
.book-an-appointment-form textarea,
.book-an-appointment-form .wp-block-jetpack-input input,
.book-an-appointment-form .wp-block-jetpack-input textarea {
  width: 100%;
  background: #fff;
  border: var(--aac-border);
  border-radius: var(--aac-radius);
  padding: 14px 16px;
  line-height: 1.5;
  font-size: 16px;
  color: var(--aac-fg);
  outline: none;
  transition: border-color .12s ease, box-shadow .12s ease;
}

/* placeholder */
.book-an-appointment-form ::placeholder {
  color: var(--aac-muted);
  opacity: 1;
}

/* focus */
.book-an-appointment-form input:focus,
.book-an-appointment-form textarea:focus,
.book-an-appointment-form .wp-block-jetpack-input input:focus,
.book-an-appointment-form .wp-block-jetpack-input textarea:focus {
  border-color: #0369a1;
  box-shadow: var(--aac-focus-ring);
}

/* checkboxes grid */
.book-an-appointment-form .wp-block-jetpack-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px 16px;
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  border: none !important;
}
.book-an-appointment-form .wp-block-jetpack-options li,
.book-an-appointment-form .wp-block-jetpack-option {
  display: flex;
  align-items: center;
  gap: 8px;
}
.book-an-appointment-form input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #0369a1;
}

/* helper/error text */
.book-an-appointment-form .description,
.book-an-appointment-form .help,
.book-an-appointment-form .hint {
  color: var(--aac-muted);
  font-size: 15px;
}
.book-an-appointment-form .error,
.book-an-appointment-form .is-error,
.book-an-appointment-form .has-error {
  color: #b91c1c;
  font-weight: 600;
}
.book-an-appointment-form .error input,
.book-an-appointment-form .is-error input,
.book-an-appointment-form .has-error input,
.book-an-appointment-form .error textarea,
.book-an-appointment-form .is-error textarea,
.book-an-appointment-form .has-error textarea {
  border-color: #b91c1c !important;
  box-shadow: 0 0 0 3px rgba(185,28,28,.25) !important;
}

/* submit button — follow theme color */
.book-an-appointment-form .wp-block-button__link,
.book-an-appointment-form .wp-element-button,
.book-an-appointment-form button[type="submit"],
.book-an-appointment-form .wp-block-jetpack-button__button,
.book-an-appointment-form .jetpack-button.button {
  display: inline-block;
  width: 100%;
  padding: 14px 18px;
  border-radius: 100px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: transform .06s ease, filter .15s ease, box-shadow .15s ease;
}
.book-an-appointment-form .wp-block-button__link:hover,
.book-an-appointment-form .wp-element-button:hover,
.book-an-appointment-form .wp-block-jetpack-button__button:hover {
  filter: brightness(.97);
}
.book-an-appointment-form .wp-block-button__link:active,
.book-an-appointment-form .wp-element-button:active,
.book-an-appointment-form .wp-block-jetpack-button__button:active {
  transform: translateY(1px);
}

/* animation fix */
.book-an-appointment-form .is-style-animated {
  opacity: 0;
  transform: translateY(6px);
  animation: aacFadeUp .28s ease-out .02s both;
}
@keyframes aacFadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .book-an-appointment-form .is-style-animated {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ======================================================
   SERVICE PAGE BUTTONS (.decor SECTION)
   ====================================================== */

/* Base: solid blue, pill shape, full size with smaller text */
.decor .wp-block-buttons .wp-block-button .wp-block-button__link,
.decor .wp-block-buttons .wp-element-button {
  background-color: var(--wp--preset--color--main);
  color: #fff;
  border: 0 !important;
  border-radius: 100px !important; /* pill shape like homepage */
  text-decoration: none;
  padding: 14px 28px; /* keep same height/width */
  font-size: 15px !important; /* slightly smaller text */
  line-height: 1.4;
  font-weight: 600;
  transition: background-color .25s ease, color .25s ease, transform .06s ease, box-shadow .15s ease;
}

/* Hover: theme orange (animated) */
.decor .wp-block-buttons .wp-block-button .wp-block-button__link:hover,
.decor .wp-block-buttons .wp-element-button:hover {
  background-color: var(--wp--preset--color--accent, var(--wp--preset--color--contrast, #f59e0b)) !important;
  color: #fff;
}

/* Active + focus */
.decor .wp-block-buttons .wp-block-button .wp-block-button__link:active,
.decor .wp-block-buttons .wp-element-button:active {
  transform: translateY(1px);
}
.decor .wp-block-buttons .wp-block-button .wp-block-button__link:focus-visible,
.decor .wp-block-buttons .wp-element-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(3,105,161,.4);
}

/* Outline-style buttons inside this section still filled */
.decor .wp-block-button.is-style-outline .wp-block-button__link {
  background-color: var(--wp--preset--color--main);
  color: #fff;
  border: 0 !important;
  border-radius: 100px !important;
  padding: 14px 28px;
  font-size: 15px !important;
}