/* Static-site additions layered on top of the original theme (site-style.min.css).
   Only responsive and accessibility fixes; colours and typography come from the theme. */

:root {
  --pc-accent: #e14e3d;
  --pc-video-max-width: 22.5rem; /* 360px, the embed width used on the Umbraco site */
}

/* Skip link (Bootstrap .visually-hidden-focusable shows it on keyboard focus) */
.skip-link:focus {
  position: fixed;
  inset-block-start: 0.5rem;
  inset-inline-start: 0.5rem;
  z-index: 1100;
  padding: 0.5rem 1rem;
  background: #fff;
  color: #000;
  border: 2px solid var(--pc-accent);
}

:is(a, button, [role="button"], input, textarea):focus-visible {
  outline: 3px solid var(--pc-accent);
  outline-offset: 2px;
}

/* Home page portrait: was an inline float that squeezed the text on phones */
.about__portrait {
  float: left;
  margin: 0 1.25rem 1.25rem 0;
  max-width: 100%;
  height: auto;
  border: 1px solid #000;
}

@media (max-width: 575.98px) {
  .about__portrait {
    float: none;
    display: block;
    margin-inline: auto;
  }
}

/* YouTube embeds: fixed 360x203 iframes on the live site; now fluid 16:9 up to the same width */
.video-embed {
  max-width: var(--pc-video-max-width);
}

.video-embed iframe {
  border: 0;
}

/* Self-hosted videos and other media never overflow their column */
:where(main) :is(video, iframe, img) {
  max-width: 100%;
}

#main video {
  height: auto;
}

/* Top bar: let email and phone wrap on narrow screens instead of overflowing */
#topbar .contact-info {
  row-gap: 0.25rem;
}

#topbar .contact-info a,
#topbar .contact-info span {
  overflow-wrap: anywhere;
}

@media (max-width: 575.98px) {
  #topbar {
    height: auto;
    padding-block: 0.4rem;
  }

  #topbar .contact-info i.ms-4 {
    margin-inline-start: 0 !important;
  }

  .breadcrumbs h2 {
    font-size: 1.5rem;
  }
}

/* Long words (Italian wine names, email addresses) must not cause horizontal scrolling */
#contentMain,
#footer {
  overflow-wrap: break-word;
}

/* Email addresses: Cloudflare showed these as plain text in the theme colour; keep that look as links */
:is(#footer .footer-contact, .contact .info-box) a[href^="mailto:"] {
  color: inherit;
}

/* Contact form */
.contact .email-form label {
  display: block;
  margin-block-end: 0.15rem;
}

.contact .email-form .field-error {
  display: block;
  font-size: 0.85rem;
}

.contact .email-form .field-error:empty {
  display: none;
}

.contact .email-form .form-control[aria-invalid="true"] {
  border-color: #dc3545;
}

.contact .email-form button[type="submit"][disabled] {
  opacity: 0.65;
  cursor: progress;
}

.contact .email-form .is-visible {
  display: block;
}

.contact-form__trap {
  position: absolute;
  inset-inline-start: -10000px;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
}

/* Contact info boxes stack below the form on tablets and phones */
@media (max-width: 991.98px) {
  .contact .info-container {
    margin-block-start: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.contact-form__status > .is-visible {
  margin-block: 1rem;
}
