/*
Theme Name: Linie 925 Theme
Author: cekom GmbH
Description: Block Theme – Landingpage für die Linie 925 (Essen – Löningen)
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
Text Domain: linie925
*/
:root {
  --overlap-bottom-col-val: 18rem;
  scroll-margin-top: 2rem;
  scroll-behavior: smooth;
}

html {
  overflow-x: hidden;
}

img,
video {
  display: block;
  max-width: 100%;
}

.container {
  max-width: var(--wp--style--global--content-size, 1650px);
  padding-inline: 2.25rem;
  margin-inline: auto;
}

::marker {
  color: var(--wp--preset--color--primary);
}

.datenschutz,
.barrierefreiheit {
  ::marker {
    color: black;
    font-size: 1.15em;
  }
}

ul {
  li {
    list-style-position: outside;
  }
}

.wp-block-post-content {
  margin-top: 0;
}


header {
  background-color: var(--wp--preset--color--white, #fff);
  height: 160px;
  max-height: 160px;

  >.container {
    height: 100%;
  }

  @media(width >=782px) {
    height: 220px;
    max-height: 220px;
  }

  .header-content {
    height: 100%;
    display: flex;
    align-items: center;

    .wp-block-site-logo {
      padding-block: 2.1875rem;

      img {
        max-width: 150px;
        width: 100%;

        @media (width >=430px) {
          max-width: unset;
        }
      }

    }
  }
}

.fahrplan-btn-fixed {
  position: fixed;
  top: 130px;
  right: 0;
  z-index: 9999;
  margin: 0 !important;

  .wp-block-button {
    a {
      border-top-right-radius: 0px;
      border-bottom-right-radius: 0px;
    }
  }

  @media (width >=782px) {
    top: 170px;
  }
}



button,
.wp-block-button__link {
  min-width: 230px;
  transition: all .2s ease-in-out;
  cursor: pointer;
}

@media (max-width: 781px) {

  .wp-element-button,
  .wp-block-button__link {
    padding-block: .8125rem;
    padding-inline: .875rem;
  }
}


.wp-block-table.tabelle-fahrzeiten {
  table {
    * {
      border: none;
    }

    thead {
      text-align: left;
    }

    td,
    th {
      padding-left: 0;
      padding-right: .25em;
      padding-block: .25em;
    }

    tr th:first-child {
      white-space: nowrap;
    }
  }
}


.clip-path-left-to-right {
  clip-path: polygon(0 0%, 100% 0%, 100% 95%, 0% 100%);
}

.wp-block-linie925-hero {
  position: relative;

  .hero-content {
    position: absolute;
    inset: 0;
    padding-block: 3.4375rem;
    color: #fff;
    background-color: var(--wp--preset--color--primary);
    clip-path: polygon(0 0%, 100% 0%, 100% 70%, 0% 100%);
    z-index: 20;
    height: fit-content;

    h1 {
      margin: unset;
      max-width: 555px;
    }

    .hero-body {
      margin: 0;
    }
  }

  img {
    width: 100%;
    max-height: 700px;
    object-fit: cover;
    padding-top: 10rem;

    @media (width >=782px) {
      padding-top: unset;
    }
  }
}

.wp-block-linie925-page-heading {
  background-color: var(--wp--preset--color--primary);
  clip-path: polygon(0 0%, 100% 0%, 100% 70%, 0% 100%);
  padding-block: 3rem 6rem;
  color: #fff;

  .page-heading-inner {
    max-width: var(--wp--style--global--content-size);
    padding-inline: 2.25rem;
    margin-inline: auto;
  }

  h1 {
    margin: unset;
  }
}

footer {
  margin-top: auto;
  margin-top: 10rem;
  background-color: var(--wp--preset--color--primary);
  color: #ffffff;
  position: relative;
  padding-block: 3.4375rem;

  @media (width >=782px) {
    padding-block: 7.5rem;
  }

  &::before {
    content: "";
    position: absolute;
    top: -80px;
    left: 0;
    height: 80px;
    width: 100%;
    background-color: var(--wp--preset--color--primary);
    clip-path: polygon(0 70%, 100% 0%, 100% 100%, 0% 100%);
  }

  .footer-inner {
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    gap: 1.875rem;
    height: 100%;

    @media (width >=782px) {
      flex-direction: row;
    }

    li {
      list-style: none;
    }

    a {
      color: #fff;
      text-decoration: none;
    }
  }
}

.overlap-bottom-col {
  margin-bottom: calc(var(--overlap-bottom-col-val) * -1) !important;
}

@media (width >=782px) {
  .text-column-right {
    padding-top: 8.75rem;
  }

  .overlay-image-padding {
    padding-top: 1.25em;
  }
}

.gewinnspiel_column {
  padding-block: 12rem;
  padding-block-end: 6rem;

  @media (width > 782px) {
    padding-block: 6.25rem;
  }
}


input[type="checkbox"] {
  width: 1.5625rem;
  height: auto;
  aspect-ratio: 1;
}

.linien-info {
  margin-block: 4.5rem;

  @media (width >=782px) {
    margin-block: 9rem;
  }
}

/* Gewinnspiel-Formular */
.linie925-form {
  font-family: inherit;
  color: #fff;
  margin-top: 0;

  .linie925-form__error,
  .linie925-form__success {
    padding: 1rem 1.25rem;
    border-radius: 6px;
    margin-bottom: 1.25rem;
    line-height: 1.5;
    max-width: fit-content;
    position: relative;
    z-index: 30;
    max-width: 40ch;
  }

  .linie925-form__error {
    background: #fdecea;
    border-left: 4px solid #c62828;
    color: #7f1d1d;
  }

  .linie925-form__success {
    background: #edf7ed;
    border-left: 4px solid var(--wp--preset--color--accent, #5BAA46);
    color: #1a3a1a;
  }

  .linie925-form__quiz {
    margin-bottom: 1.5rem;
  }

  .linie925-form__quiz-label {
    font-weight: 600;
    max-width: 830px;
    margin-top: 0;
  }

  .linie925-form__radio-group {
    display: flex;
    gap: 1.125rem;
    flex-direction: column;
    flex-wrap: wrap;

  }

  .linie925-form__radio-card {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 2px solid var(--wp--preset--color--primary, #005CA9);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;

    input[type="radio"] {
      accent-color: var(--wp--preset--color--accent, #5BAA46);
      width: 25px;
      height: auto;
      aspect-ratio: 1;
      margin: 0;
    }

    &:has(input:checked),
    &.is-selected {
      /* background: var(--wp--preset--color--accent, #5BAA46);s */
      color: #fff;
    }
  }

  .linie925-form__fields {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 1.25rem;
  }

  .linie925-form__row {
    display: flex;
    gap: 0.625rem;
    flex-wrap: wrap;

    input {
      flex: 1;
      min-width: 0;
    }

    &.linie925-form__row--2 input {
      flex: 1 1 calc(50% - 0.31rem);
      min-width: 140px;
    }
  }

  .linie925-form__fields input {
    padding: .75rem 1.1875rem;
    border: 1.5px solid #ccd6e0;
    font-size: var(--wp--preset--font-size--base);
    font-family: inherit;
    font-weight: 300;
    background: #fff;
    color: #1a1a1a;
    transition: border-color 0.15s;
    max-width: 48.125rem;

    &::placeholder {
      color: rgba(0, 0, 0, 0.63);
    }

    &:focus {
      outline: none;
      border-color: var(--wp--preset--color--primary, #005CA9);
      box-shadow: 0 0 0 3px rgba(0, 92, 169, 0.15);
    }
  }

  .linie925-form__checkbox {
    margin-bottom: 1.25rem;
    line-height: 1.5;

    label {
      display: flex;
      align-items: start;
      gap: .5rem;
      cursor: pointer;
    }

    input[type="checkbox"] {
      margin: 0;
      margin-top: 0.2em;
      accent-color: var(--wp--preset--color--accent, #005CA9);
      flex-shrink: 0;
    }

    a {
      color: #fff;
    }
  }

  .linie925-form__submit {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--wp--preset--color--accent, #5BAA46);
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s;

    &:hover,
    &:focus {
      background: #4a9038;
      outline: 3px solid rgba(91, 170, 70, 0.4);
      outline-offset: 2px;
    }
  }
}

.kein-stress {
  padding-bottom: 16rem;

  @media (width > 781px) {
    padding-bottom: 8rem;
  }
}