/*
 * Additions to Webflow's stylesheet (which stays untouched). Patrick, 2026-09-29.
 * Sections 1 to 8 were written by scripts/changes.py before go-live. Since go-live
 * (2026-09-29) this file is edited here directly; changes.py is retired.
 * The file's name carries its date: files under /assets/ are kept by browsers for a year,
 * so a change needs a new name (and the link in src/layouts/Seite.astro changes with it).
 *
 *   1, 2  Stoerer (banners)
 *   3     cookie banner: equal buttons; fits below the header on phones
 *   4     long headlines of the legal pages on phones
 *   5     a tile that is alone in its row stands in the middle
 *   6     Stoerer on phones: room between text, buttons and the edge of the screen
 *   7     "Community": two tiles fill the row
 *   8     Banner, the slim notice on course pages (src/components/Banner.astro)
 *   9-20  Patrick's list of 2026-09-30, the first after go-live (see ../../../../notes-changes-since-capture.md)
 *   21    job pages: the job's name as headline fits a phone (Work Board, 2026-09-29)
 *   22    Surfkurs Finder: answers as large buttons, a live count of matching courses (Work Board, 2026-09-29)
 */

/* 1. Text readable on any picture: a dark veil over the picture, strongest where the text is.
      On wide screens the text stands on the left; on phones it runs over the whole banner. */
.uui-section_stoerer .background-is-image { position: relative; }
.uui-section_stoerer .background-is-image::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(90deg, rgba(0, 0, 50, 0.62) 0%, rgba(0, 0, 50, 0.42) 38%, rgba(0, 0, 50, 0.08) 72%, rgba(0, 0, 50, 0) 100%);
}
.uui-section_stoerer .background-is-image > * { position: relative; }
.uui-section_stoerer .background-is-image h2,
.uui-section_stoerer .background-is-image .text-color-white { text-shadow: 0 1px 14px rgba(0, 0, 50, 0.45); }
@media screen and (max-width: 767px) {
  .uui-section_stoerer .background-is-image::before {
    background-image: linear-gradient(180deg, rgba(0, 0, 50, 0.38) 0%, rgba(0, 0, 50, 0.58) 100%);
  }
}

/* 2. A place without any Stoerer shows nothing (Webflow would print "No items found."). */
.uui-section_stoerer .w-dyn-empty { display: none; }

/* 3. Cookie banner.
      a) No choice is highlighted: all four buttons look the same. */
.cw-button_primary,
.cw-button_secondary,
.cw-button_primary:hover,
.cw-button_secondary:hover {
  color: #fff;
  background-color: #023047;
  border: 1px solid #023047;
  font-weight: 400;
}
.cw-button_primary:hover,
.cw-button_secondary:hover { background-color: #344054; border-color: #344054; }
/*    b) Never taller than the window (the list of choices can be opened). */
.cw-cookie_banner { max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow-y: auto; overscroll-behavior: contain; }
/*    c) Phones: the banner ends below the header (logo and menu stay free), its long text
         scrolls inside it, the buttons are always in view and stand closer together. */
@media screen and (max-width: 767px) {
  .cw-cookie_banner {
    padding: 0.875rem 1rem 1rem;
    max-height: calc(100vh - 190px);
    max-height: calc(100dvh - 108px);
    overflow: hidden;
  }
  .cw-cookie_content {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 190px - 1.875rem);
    max-height: calc(100dvh - 108px - 1.875rem);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .cw-cookie_content > * { flex: none; }
  .cw-cookie_content > h3 { margin-top: 0; margin-bottom: 0.375rem; font-size: 0.9375rem; line-height: 1.3; }
  .cw-cookie_content > p {
    flex: 0 1 auto;
    min-height: 4.5rem;
    max-height: 9.75rem;
    margin-bottom: 0.5rem;
    overflow-y: auto;
    line-height: 1.4;
  }
  .cw-cookie_buttons { grid-row-gap: 0.5rem; row-gap: 0.5rem; margin-top: 0.75rem; }
  .cw-cookie_options { grid-row-gap: 0.625rem; row-gap: 0.625rem; margin-top: 1rem; margin-bottom: 0.75rem; }
  .cw-button_primary,
  .cw-button_secondary { width: 100%; padding: 0.8125rem 1.5rem; }
}

/* 4. Legal pages: a headline of one long word ("Datenschutzerklaerung") was wider than a phone.
      These headlines are the ones whose whole text is bold. */
@media screen and (max-width: 767px) {
  h1.heading-xlarge > strong:only-child { overflow-wrap: break-word; hyphens: auto; }
}
@media screen and (max-width: 479px) {
  h1.heading-xlarge:has(> strong:only-child) { font-size: min(2.25rem, 7.4vw); line-height: 1.2; }
  /* The net below every headline: a word that is wider than the phone is broken instead of cut off.
     It changes nothing where the words fit. Nicer: a soft hyphen in the word (scripts/changes.py). */
  h1, h2, h3 { overflow-wrap: break-word; }
}

/* 5. A tile that is alone in a row of two (the location, since there is only one) stands in
      the middle, and so does the headline above it. With a second tile all is as before. */
@media screen and (min-width: 768px) {
  .uui-blogsection07_list > .uui-blogsection07_item:only-child { grid-column: 1 / -1; justify-self: center; width: calc(50% - 0.5rem); }
  .uui-blogsection07_component:has(.uui-blogsection07_list > .uui-blogsection07_item:only-child) .uui-blogsection07_heading { grid-column: 1 / -1; margin-right: 0; text-align: center; }
  .uui-blogsection07_component:has(.uui-blogsection07_list > .uui-blogsection07_item:only-child) .uui-blogsection07_heading > * { margin-left: auto; margin-right: auto; }
}

/* 6. Stoerer on phones: the home page's design had no room on the left, and its buttons ran from
      edge to edge. Now text and buttons keep the distance the other sections keep. */
@media screen and (max-width: 767px) {
  .uui-section_stoerer .uui-page-padding-5,
  .uui-section_stoerer .uui-page-padding-5.padding-left--none { padding-left: 1.25rem; padding-right: 1.25rem; }
}

/* 7. "Community" (Supieria, About You Pangea): two tiles in a row made for three left a third of
      the row empty. Two tiles share the whole row; a third brings the three columns back. */
@media screen and (min-width: 480px) {
  .uui-section_community .uui-layout89_component.grid-3:has(> .uui-layout89_item:nth-child(2):last-child) { grid-template-columns: 1fr 1fr; }
}

/* 8. Banner: a strip of text with one button. "Aktion" blue, "Hinweis" light. */
.ssk-banner { padding: 0 2rem; margin: 2rem 0; }
.ssk-banner_inhalt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  max-width: 80rem;
  margin: 0 auto;
  padding: 1.125rem 1.5rem;
  border-radius: 0.75rem;
  border-left: 0.375rem solid #e6003c;
}
.ssk-banner--aktion .ssk-banner_inhalt { background-color: #023047; color: #fff; }
.ssk-banner--hinweis .ssk-banner_inhalt { background-color: #e4eafa; color: #1e1a35; border-left-color: #006dff; }
.ssk-banner_text { min-width: 0; }
.ssk-banner_ueberschrift { margin: 0; font-family: custom_Sourcecodepro, monospace; font-size: 1.125rem; font-weight: 600; line-height: 1.35; letter-spacing: 0.01em; text-transform: uppercase; overflow-wrap: break-word; }
.ssk-banner_zeile { margin: 0.25rem 0 0; font-size: 1rem; line-height: 1.5; }
.ssk-banner_ueberschrift:only-child, .ssk-banner_zeile:only-child { margin: 0; }
.ssk-banner_knopf {
  flex: none;
  padding: 0.6875rem 1.25rem;
  border-radius: 0.5rem;
  font-family: custom_Sourcecodepro, monospace;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s;
}
.ssk-banner--aktion .ssk-banner_knopf { background-color: #fff; color: #023047; }
.ssk-banner--hinweis .ssk-banner_knopf { background-color: #006dff; color: #fff; }
.ssk-banner_knopf:hover { transform: translateY(-2px); }
@media screen and (max-width: 767px) {
  .ssk-banner { padding: 0 0.5rem; margin: 1.5rem 0; }
  .ssk-banner_inhalt { flex-direction: column; align-items: flex-start; padding: 1rem 1.125rem; }
  .ssk-banner_ueberschrift { font-size: 1rem; }
  .ssk-banner_zeile { font-size: 0.9375rem; }
  .ssk-banner_knopf { white-space: normal; }
}

/* ---- Patrick's list of 2026-09-30 ---------------------------------------------------------- */

/* 9. No purple (leftovers of the "Untitled UI" template): a tapped button on a phone got a purple
      border, the FAQ plus/minus icons and the chosen answer in the Surfkurs Finder were purple.
      The template's purple shades become the site's dark blue and its light blue ring. */
:root {
  --untitled-ui-primary50: #eef4ff;
  --untitled-ui-primary100: #006dff1a;
  --untitled-ui-primary300: #80b6ff;
  --untitled-ui-primary500: #006dff;
  --untitled-ui-primary600: #000032;
  --untitled-ui-primary700: #000032;
  --untitled-ui-primary800: #000032;
}
.main-button-2:hover, .main-button-3:hover { border-color: #000032; }
a, button { -webkit-tap-highlight-color: rgba(0, 0, 50, 0.12); }

/* 10. Footer on phones: a link over two lines stays centred like the others; Kitesurfkurse under
       Windsurfkurse is in src/components/Footer.astro. */
@media screen and (max-width: 479px) {
  .footer_link { text-align: center; text-wrap: balance; }
}

/* 11. Jobs page: the whole job card opens the job. On phones Webflow hid the "mehr erfahren" link,
       so a job could not be opened at all; it is shown again. */
.career09_item { position: relative; }
.career09_item .button-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
@media screen and (max-width: 479px) {
  .career09_button-wrapper { display: block; }
}

/* 12. Our own videos in place of the Vimeo videos that no longer exist (Gutscheine, Surf Jobs) */
.w-video > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }

/* 13. A Vimeo player with a fixed width (YOUSURF pages): no wider than the screen */
.w-embed.w-iframe > iframe[src*="player.vimeo.com"] { max-width: 100%; height: auto; aspect-ratio: 16 / 9; }

/* 14. Buttons with a long text (e.g. "Weitere Infos zum Kinderprogramm" on /events) wrap on phones
       instead of reaching beyond the screen. */
@media screen and (max-width: 479px) {
  .main-button, .main-button-2, .main-button-3 { white-space: normal; max-width: 100%; }
}

/* 15. The logo on phones: Webflow let it grow to the full size of its file (170 px wide, larger than
       on the desktop), which made it look big and soft. Now 96 px wide. */
@media screen and (max-width: 479px) {
  .logo_component { height: 3rem; }
}

/* 16. The map on course pages on phones: Webflow gave address and map together 20rem, which left
       the map 89 px (only water). The map now has 22rem of its own. */
@media screen and (max-width: 767px) {
  .uui-contact14_component.map-large { height: auto; }
  .uui-contact14_component.map-large .w-tab-content { height: 22rem; }
  .uui-contact14_component.map-large .uui-contact14_tab-pane { height: 100%; }
}

/* 17. Bottom bar of course pages (WhatsApp / Jetzt buchen): above the map, below the WhatsApp chat.
       The cookie button sits on the bar, level with its icons (the height is set by
       seite-*.js, which measures the icons). */
@media screen and (max-width: 767px) {
  .mobile-kurs-menu { z-index: 25; }
  .cw-cookie_icon { z-index: 26; }
  .cw-cookie_banner { z-index: 40; }
}

/* 18. Google Maps only with consent (seite-*.js): in its place a notice and a button */
.ssk-karte-hinweis {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem;
  padding: 1.5rem; text-align: center;
  background: #eef4ff; border: 1px solid #d5e4ff;
}
.ssk-karte-hinweis p { margin: 0; max-width: 28rem; color: #000032; font-size: 1rem; line-height: 1.5; }
.ssk-karte-hinweis .ssk-link { background: none; border: 0; padding: 0; color: #000032; text-decoration: underline; cursor: pointer; font: inherit; font-size: .9rem; }
.ssk-karte-rahmen { position: relative; min-height: 20rem; }
.ssk-karte-aus .uui-contact14_map-wrapper > .text-size-regular.position-relative { display: none; }

/* 19. Play / pause for the header videos (accessibility: moving pictures must be stoppable) */
.ssk-video-knopf {
  position: absolute; right: 1rem; bottom: 1rem; z-index: 5;
  width: 2.75rem; height: 2.75rem; padding: 0; border: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 50, 0.6); color: #fff; cursor: pointer;
}
.ssk-video-knopf:hover { background: rgba(0, 0, 50, 0.85); }
.ssk-video-knopf:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.ssk-video-knopf svg { width: 1.1rem; height: 1.1rem; fill: currentColor; }

/* 20. YouSwim: the header picture's file name had a decomposed "ü", which the server does not
       find (404 on the live site). The same picture under a plain name. */
.heroheader14_image-background.youswim {
  background-image: url("/assets/eigenes/youswim-header-schwimmen-lernen-rostock.webp");
}

/* 21. Job pages: the headline is the job's name in large monospaced capitals. On phones a long
       word ("STATIONSASSISTENTIN", 19 letters) was wider than the screen, and long names filled
       the first screen with five or six lines. The size now follows the screen's width: 19
       letters fit at 320 px, and a long name takes three or four lines,
       without hyphens. "(M/W/D)" below it has the same size. */
@media screen and (max-width: 767px) {
  h1.heading-xlarge.ssk-job-titel,
  h1.ssk-job-titel + h2.heading-large {
    font-size: min(2.24rem, 7.2vw);
    line-height: 1.2;
    text-wrap: balance;
  }
}

/* 22. Surfkurs Finder: each answer is a button of its own (at least 48 px high, easy to hit with
       a thumb) instead of a small circle; the chosen one is dark blue. Sports in two columns,
       days in one row. Below the questions, the number of matching courses changes with every
       choice (Finsweet's results-count) and leads down to them. */
.finder-wahl { grid-column-gap: .5rem; grid-row-gap: .5rem; column-gap: .5rem; row-gap: .5rem; }
.finder-wahl--sport { grid-template-columns: 1fr 1fr; }
.finder-wahl--ziel { grid-template-columns: 1fr; }
.finder-wahl--dauer { grid-template-columns: repeat(5, 1fr); }
.finder-wahl .w-radio {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  min-height: 3rem; margin: 0; padding: .5rem .75rem;
  border: 1px solid #d0d5dd; border-radius: .75rem; background-color: #fff;
  text-align: center; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .15s, border-color .15s;
}
.finder-wahl .w-radio::before,
.finder-wahl .w-radio::after { content: none; }
.finder-wahl .w-radio .w-radio-input {
  position: absolute; inset: 0; opacity: 0;
  width: 100%; min-width: 0; height: 100%; min-height: 0; margin: 0; cursor: pointer;
}
.finder-wahl .uui-form-radio-label { color: #000032; font-weight: 600; line-height: 1.3; }
.finder-wahl--ziel .w-radio { justify-content: flex-start; text-align: left; }
.finder-wahl .w-radio:hover { border-color: #000032; }
.finder-wahl .w-radio:has(:checked) { background-color: #000032; border-color: #000032; }
.finder-wahl .w-radio:has(:checked) .uui-form-radio-label { color: #fff; }
.finder-wahl .w-radio:has(:focus-visible) { outline: 2px solid #000032; outline-offset: 2px; }
.finder-treffer { margin: .25rem 0 .75rem; color: #000032; font-weight: 600; }
.finder-treffer a { color: inherit; text-decoration: underline; }
.finder-leer { margin: 0 0 .75rem; color: #000032; }
#finder-kurse { scroll-margin-top: 6rem; }
