/* Site additions layered on top of the original compiled design — kept in
   their own file so the original build's CSS stays byte-identical. */

/* About page "Award" card: image beside the text on wider screens, stacked
   on mobile. Uses a scoped class rather than Tailwind's sm:flex-row, since
   this stylesheet is pre-compiled from the original build and only
   contains utilities the original React app actually used. */
.ec-award-card { container-type: inline-size; }
@container (min-width: 600px) {
  .ec-award-layout { flex-direction: row; align-items: center; }
  .ec-award-layout > button { margin: 0; }
  .ec-award-layout h2 { margin-top: 0; }
}

/* WhatsApp floating button: a periodic ring draws the eye without being
   constantly distracting, and a dismissible speech bubble nudges
   first-time visitors toward the lowest-friction way to get in touch. */
/* Explicit size rather than relying on a Tailwind class: this stylesheet
   is pre-compiled from the original build, so only utility classes the
   original React app actually used exist in it — h-14/w-14 do not. */
#ec-whatsapp-btn { position: fixed; overflow: visible; width: 56px; height: 56px; }
.ec-whatsapp-ping {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: #25d366;
  animation: ec-wa-ping 2.2s cubic-bezier(0, 0, 0.2, 1) infinite;
  pointer-events: none;
}
@keyframes ec-wa-ping {
  0% { transform: scale(1); opacity: 0.55; }
  70%, 100% { transform: scale(1.8); opacity: 0; }
}

.ec-whatsapp-bubble {
  position: fixed;
  z-index: 49;
  right: 1.25rem;
  bottom: 5.5rem;
  max-width: 230px;
  background: #fff;
  color: #1f2937;
  border-radius: 14px;
  padding: 12px 30px 12px 14px;
  font-size: 13px;
  line-height: 1.45;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}
.ec-whatsapp-bubble.ec-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.ec-whatsapp-bubble::after {
  content: "";
  position: absolute;
  right: 22px;
  bottom: -7px;
  width: 14px;
  height: 14px;
  background: #fff;
  transform: rotate(45deg);
}
.ec-whatsapp-bubble p { margin: 0; }
.ec-whatsapp-bubble-close {
  position: absolute;
  top: 2px;
  right: 6px;
  border: 0;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  color: #9ca3af;
  cursor: pointer;
  padding: 6px;
}
.ec-whatsapp-bubble-close:hover { color: #4b5563; }

@media (prefers-reduced-motion: reduce) {
  .ec-whatsapp-ping { display: none; }
  .ec-whatsapp-bubble { transition: none; }
}

/* Welcome popup: wider panel. With an image on tablet/desktop the image sits
   beside the text so the wider panel doesn't turn into a very tall one. */
#ec-welcome-popup .ec-popup-panel { max-width: min(36rem, 100%); }
@media (min-width: 768px) {
  #ec-welcome-popup .ec-popup-panel:has(> img) {
    max-width: min(54rem, 100%); display: grid; grid-template-columns: 1.05fr 1fr; align-items: center;
  }
  #ec-welcome-popup .ec-popup-panel:has(> img) > img { height: 100%; max-height: 90vh; }
  #ec-welcome-popup .ec-popup-panel:has(> img) > div { padding: 2.5rem 2.25rem; }
}

/* Analytics consent banner */
.ec-consent {
  position: fixed; z-index: 85; left: 1rem; right: 1rem; bottom: 1rem;
  max-width: 34rem; margin: 0 auto; padding: 1.1rem 1.25rem;
  background: var(--background, #fff); color: var(--foreground, #3b1a20);
  border: 1px solid color-mix(in oklab, var(--gold, #c9a45c) 45%, transparent);
  border-radius: 1.25rem; box-shadow: 0 18px 50px rgba(0,0,0,.22);
  font-size: .875rem; line-height: 1.5;
  opacity: 0; transform: translateY(16px); transition: opacity .4s ease, transform .4s ease;
}
.ec-consent.ec-visible { opacity: 1; transform: none; }
.ec-consent p { margin: 0; }
.ec-consent strong { display: block; font-size: 1rem; color: var(--primary, #7a1130); margin-bottom: .25rem; }
.ec-consent-actions { display: flex; gap: .6rem; justify-content: flex-end; margin-top: .9rem; }
.ec-consent-btn { cursor: pointer; border-radius: 9999px; padding: .55rem 1.3rem; font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.ec-consent-reject { background: transparent; color: var(--primary, #7a1130); border: 1px solid color-mix(in oklab, var(--primary, #7a1130) 35%, transparent); }
.ec-consent-accept { background: var(--primary, #7a1130); color: var(--primary-foreground, #fff); border: 1px solid transparent; }
.ec-consent-reopen {
  position: fixed; z-index: 45; left: 1.25rem; bottom: 5rem; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  border-radius: 9999px; border: 1px solid color-mix(in oklab, var(--gold, #c9a45c) 50%, transparent);
  background: var(--background, #fff); color: var(--primary, #7a1130); box-shadow: 0 4px 14px rgba(0,0,0,.12);
}
.ec-consent-reopen[hidden], .ec-consent[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .ec-consent { transition: none; } }


/* 404 page (layout from the original site's not-found screen) */
.ec-404 { padding-top: 6rem; padding-bottom: 6rem; min-height: 55vh; justify-content: center; }
.ec-404-code { font-size: clamp(4.5rem, 14vw, 8rem); line-height: 1; opacity: .18; margin: 0 0 .5rem; }
.ec-404-btn { display: inline-block; margin-top: 1.75rem; }

/* reCAPTCHA badge sits above the WhatsApp button instead of on top of it. */
.grecaptcha-badge { bottom: 92px !important; z-index: 44 !important; }

/* Review cards share the tallest card's height: keep the divider, stars and
   name pinned to the bottom so short reviews don't leave an empty gap. */
[aria-live="polite"] > figure > blockquote { margin-bottom: 1.5rem; }
[aria-live="polite"] > figure > figcaption { margin-top: auto; }

/* Wider review carousel (was max-w-2xl / 672px). */
.max-w-2xl:has(> .overflow-hidden > [aria-live="polite"]) { max-width: min(56rem, 100%); }
/* Phones: each card fits its own review; the frame eases to the active card's height. */
@media (max-width: 767px) {
  .overflow-hidden:has(> [aria-live="polite"]) { transition: height .5s ease; }
  [aria-live="polite"] { align-items: flex-start; }
}
@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  .overflow-hidden:has(> [aria-live="polite"]) { transition: none; }
}


/* Footer last line spans the full width (clear of the floating buttons on each side). */
@media (min-width: 1280px) {
  footer > div > div:last-child { width: 100%; padding-left: 5.5rem !important; padding-right: 6rem !important; justify-content: space-between !important; }
}
footer a[href^="https://ia.uk"] { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }

/* Below desktop: footer runs to the bottom of the page (no blank strip); its last line
   is narrowed to sit between the floating back-to-top and WhatsApp buttons. */
@media (max-width: 1279px) {
  footer > div { padding-bottom: 1.25rem !important; }
  footer > div > div:last-child > p:last-child { max-width: calc(100vw - 10.5rem); }
}
footer a[href^="https://ia.uk"] { white-space: nowrap; }

/* Top announcement bar on narrow phones: trim the message instead of overlapping the Order link. */
header aside p > span.min-w-0 { overflow: hidden; text-overflow: ellipsis; }
header aside p > a { flex-shrink: 0; }

/* Ordinary pages (e.g. Privacy Policy) written in the WordPress editor. */
.ec-page-content > * + * { margin-top: 1rem; }
.ec-page-content h2 { margin-top: 2rem; font-family: var(--font-display, serif); font-size: 1.6rem; color: var(--primary, #7a1130); }
.ec-page-content h3 { margin-top: 1.5rem; font-size: 1.15rem; font-weight: 600; color: var(--primary, #7a1130); }
.ec-page-content ul, .ec-page-content ol { padding-left: 1.4rem; list-style: disc; }
.ec-page-content ol { list-style: decimal; }
.ec-page-content a { color: var(--primary, #7a1130); text-decoration: underline; text-underline-offset: 3px; }
.ec-page-content strong { color: var(--foreground, #3b1a20); }

/* Phones get the smaller hero photo (760px wide instead of 1290px). */
@media (max-width: 1023px) {
  section > div[style*="hero-1290.webp"] { background-image: url(hero-760.webp) !important; }
}
/* Hero text stays hidden from first paint until its entrance animation runs (no flicker). */
.ec-reveal-pending [data-reveal] { opacity: 0; }
/* Content on the first screen stays hidden until site.js animates it in (2.5s failsafe in functions.php). */
.ec-reveal-pending main :is(h2, h3, p, ul, dl, li, label, form, aside, img, iframe, figure, .grid > *, .flex-wrap > *):not(.marquee *, [aria-live], [aria-live] *, [data-hero-in], [data-hero-in] *) { opacity: 0; }

/* Top bar ticker: long messages loop on small screens (site.js adds .ec-ticker-on only when the text overflows). */
header aside p > span.ec-ticker-on { text-overflow: clip; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10px, #000 calc(100% - 10px), transparent); mask-image: linear-gradient(90deg, transparent, #000 10px, #000 calc(100% - 10px), transparent); }
.ec-ticker { display: inline-flex; animation: ec-ticker 12s linear infinite; will-change: transform; }
.ec-ticker > span { padding-right: 2.5rem; }
.ec-ticker-on:hover .ec-ticker { animation-play-state: paused; }
@keyframes ec-ticker { to { transform: translateX(-50%); } }


/* Homepage hero text: pure-CSS entrance that starts at first paint, so it never waits for scripts. */
[data-hero-in] { animation: ec-hero-in 0.55s cubic-bezier(.2, .7, .2, 1) both; }
[data-hero-in="2"] { animation-delay: 0.06s; }
[data-hero-in="3"] { animation-delay: 0.12s; }
@keyframes ec-hero-in { from { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) { [data-hero-in] { animation: none; } }

/* Accessibility: readable contrast, minimum text size and line length (WCAG AA). */
:root { --muted-foreground: oklch(44% .045 18); }
a[href^="https://wa.me/"].bg-\[\#25D366\]:not(#ec-whatsapp-btn) { background-color: #1a7f45; }
.text-\[10px\] { font-size: 11px; }
main p.leading-relaxed, main p.max-w-xl { max-width: 65ch; }
.text-gold, .\[\&\.active\]\:text-gold.active, .hover\:text-gold:hover { color: oklch(77.5% .1 85); }
