/* Layout corrections shared by every theme. Loaded after the approved Rapet styles, for screens only. */

/* Short sites keep the footer at the bottom of the window. */
body {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

body > .header,
body > .footer {
  flex-shrink: 0;
}

/* A plain introduction under a large page heading. */
.page-intro h1 + p:not([class]) {
  margin-top: 24px;
}

/* The craft photograph follows the height of its text panel, including open accordions. */
@media (min-width: 741px) {
  .craft-image {
    height: auto;
    min-height: 620px;
    align-self: stretch;
  }
}
/* Winery facts share the contact panel's type and colours in every theme. */
.winery-facts { margin-top: 1.5rem; }
.winery-facts dl { margin: 0; }
.winery-facts dt { font-weight: 600; margin-top: 1rem; }
.winery-facts dd { margin: .3rem 0 0; overflow-wrap: anywhere; }
.winery-profiles a { display: block; }

.footer-social { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin: 1.25rem 0; font-size: .875rem; }
.footer-social a { text-decoration: underline; text-underline-offset: .2em; overflow-wrap: anywhere; max-width: 100%; }

/* Rosé ranges add a third colour filter. */
.collection-colours button[data-wine-color="rose"]::before { content: ''; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; background: #d99a8c; }

/* A second phone number sits on its own line under the main one. */
.phone.phone-mobile {
  display: block;
  width: fit-content;
  margin-top: 0;
}

/* Several buttons ending a page section stay apart, including when they wrap onto two lines. */
.page-content section > .button:has(+ .button),
.page-content section > .button + .button {
  margin: 10px 10px 0 0;
}

/* Vivant stockist actions align across cards and keep their spacing when they wrap. */
.v-stockists > section { display: flex; flex-direction: column; min-width: 0; }
.v-stockist-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 8px; }
.v-stockists .v-stockist-actions .button { max-width: 100%; padding: 12px 28px; text-align: center; overflow-wrap: anywhere; }

/* Press summaries use the same records as the full press page. */
.v-press.m-press.section { padding-block: clamp(48px, 6vw, 80px); }
.v-press.m-press > h2 { font-size: clamp(2rem, 3.6vw, 3.2rem); }
.v-press .m-press-stories { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 32px; margin: 36px 0; text-align: left; }
.v-press .m-press-story { min-width: 0; margin: 0; }
.v-press-card { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.v-press-card figure { margin: 0 0 20px; }
.v-press-card img { display: block; width: 100%; height: auto; aspect-ratio: 3/2; object-fit: cover; border-radius: 16px; }
.v-press .m-press-story .v-press-card figcaption { margin-top: 8px; font: 400 .6875rem/1.45 var(--display); color: var(--muted); }
.v-press .m-press-story h3 { font-size: 1.4rem; line-height: 1.3; margin: 16px 0; }
.v-press .m-press-stories .m-press-story p { font: 400 1rem/1.65 var(--text); }
.v-press .m-press-story p.v-press-source { font: 500 .8125rem/1.5 var(--display); color: var(--muted); }
.v-press-action { margin-top: auto; padding-top: 8px; font: 500 .875rem/1.4 var(--display); }
a.v-press-card:hover h3, a.v-press-card:focus-visible h3 { color: var(--tomato); }
a.v-press-card:hover .v-press-action { text-decoration: underline; text-underline-offset: 4px; }
.v-press-read { display: inline-block; margin-top: 16px; font: 500 .9375rem/1.4 var(--display); color: var(--ink); text-decoration: none; }
.v-press-read:hover { color: var(--tomato); text-decoration: underline; text-underline-offset: 4px; }
.v-press-summary { margin-bottom: 20px; }
.press-further > p.section-label { align-self: start; justify-self: start; max-width: 100%; }

/* Center Lienhardt's footer logos and links. */
html[data-theme="vivant"][data-producer-id="lienhardt"] {
  .footer-top, .footer-links, .footer-bottom { align-items: center; }
  .footer-links, .v-certs-footer .v-cert.is-organic .v-cert-logo { margin-bottom: 0; }
  .v-certs-footer { align-self: center; }
  @media (max-width: 740px) {
    .footer-identity, .footer-links, .footer-social { justify-content: center; }
    .footer-bottom, .footer-bottom p { text-align: center; }
  }
}

/* Keep the language switch compact, with native names in an anchored dropdown. */
.languages { position: relative; display: block; flex: none; font: 500 .75rem/1.4 var(--display, var(--sans)); }
.languages > summary { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; min-height: 44px; padding: 8px 4px; list-style: none; color: inherit; }
.languages > summary::-webkit-details-marker { display: none; }
.language-chevron { width: 6px; height: 6px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.languages[open] .language-chevron { transform: translateY(2px) rotate(225deg); }
.language-options { position: absolute; z-index: 2; top: calc(100% + 8px); right: 0; min-width: 168px; padding: 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--ink); box-shadow: 0 8px 24px rgb(0 0 0 / .12); font-size: .875rem; }
.languages:not([open]) > .language-options { display: none; }
.header .languages .language-options a[data-lang] { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; padding: 10px 12px; border-radius: 3px; color: inherit; text-decoration: none; }
.language-options a:hover, .language-options a:focus-visible { background: rgb(128 128 128 / .12); }
.language-options a:focus-visible { outline-offset: -2px; }
.language-options a[aria-current="true"] { font-weight: 600; }
.language-options a[aria-current="true"]::after { content: '✓'; font-size: .8rem; }
