/* Cooking class page, in the class colours (tiramisu brown and pasta yellow). */

/* --- Gallery --- */

.class-gallery {
  position: relative;
  padding-block: 16px 0;
}

.class-gallery__grid {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  list-style: none;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.class-gallery__item {
  flex: 0 0 100%;
  scroll-snap-align: center;
}

.class-gallery__button {
  display: block;
  width: 100%;
  padding: 0;
  border-radius: var(--radius);
  overflow: hidden;
}

.class-gallery__item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.class-gallery__all {
  display: none;
}

.class-gallery__counter {
  margin-top: 8px;
  text-align: center;
}

/* --- Title block --- */

.class-head {
  padding-block: 32px 24px;
}

.class-title {
  margin-top: 4px;
}

/* In the class title the highlights read as pasta yellow underlines, not as
   coloured words, so the two words stay the colour of the rest of the title. */
.class-title .hl-1,
.class-title .hl-2 {
  color: inherit;
  background-image: linear-gradient(#E8B84A, #E8B84A);
  background-repeat: no-repeat;
  background-position: 0 92%;
  background-size: 100% 0.22em;
}

.class-head__text {
  max-width: 65ch;
  margin-top: 12px;
}

/* --- Two columns: main and price box --- */

.class-layout {
  display: grid;
  gap: 48px;
  padding-bottom: var(--section);
}

.class-aside {
  display: none;
}

.class-main {
  min-width: 0;
}

/* --- Price box --- */

.class-box {
  display: grid;
  gap: 12px;
  padding: 24px;
  background-color: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.class-box__price {
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1;
}

/* The old full price, struck through, before the price the guests pay today. */
.class-price__before {
  margin-right: 0.4em;
  color: var(--muted);
  font-size: 0.8em;
  font-weight: normal;
  text-decoration-thickness: 1.5px;
}

.class-box__hint,
.class-box__note,
.class-box__phone {
  color: var(--muted);
}

/* --- Phone bar --- */

.class-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  padding-bottom: env(safe-area-inset-bottom);
  background-color: var(--paper);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 20px rgba(34, 27, 25, 0.08);
}

.class-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 10px;
}

.class-bar__price {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1;
}

.class-bar .btn {
  min-height: 44px;
  padding: 11px 16px;
  font-size: 14px;
}

/* On narrow phones the full price would push the sticky bar onto two lines. */
@media (max-width: 429px) {
  .class-bar .class-price__before {
    display: none;
  }
}

html.booking-open .class-bar {
  display: none;
}

@media (max-width: 1023px) {
  .theme-class #main {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }
}

/* --- Facts --- */

.class-facts {
  padding-block: 8px 32px;
  border-bottom: 1px solid var(--line);
}

.class-facts__title {
  margin-bottom: 16px;
  font-size: var(--fs-h3);
}

.class-facts__list {
  display: grid;
  gap: 12px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.class-facts__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.class-facts__icon {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--tint);
  color: var(--accent);
}

.class-facts__icon svg {
  width: 24px;
  height: 24px;
}

.class-facts__text {
  padding-top: 8px;
}

/* --- Why --- */

.class-why {
  padding-block: 32px;
  border-bottom: 1px solid var(--line);
}

.class-why__title {
  margin-block: 4px 16px;
  font-size: 30px;
}

.class-why p {
  color: var(--muted);
}

.class-why__signature {
  margin-top: 12px;
  font-family: var(--script);
  font-size: 30px;
  line-height: 1;
  color: var(--accent);
}

/* --- What you will make --- */

.class-make {
  padding-block: var(--section) 0;
}

.class-make__grid {
  display: grid;
  gap: 16px;
}

.class-make__card {
  padding: 20px;
  background-color: var(--tint);
  border-top: 4px solid var(--tint-2);
  border-radius: var(--radius);
}

.class-make__card p {
  margin-top: 8px;
  color: var(--muted);
}

/* --- Steps --- */

.class-steps {
  padding-block: var(--section);
}

.class-steps__list {
  display: grid;
  gap: 16px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.class-steps__item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.class-steps__number {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--tint-2);
  color: var(--night);
  font-weight: 700;
}

.class-steps__item p {
  margin: 0;
}

/* --- Included and not included --- */

.class-incl {
  display: grid;
  gap: 24px;
  padding-bottom: var(--section);
}

.class-incl__title {
  margin-bottom: 12px;
  font-size: var(--fs-h3);
}

.class-incl__list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.class-incl__list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.class-incl__list svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: var(--accent);
}

.class-incl__col--no svg {
  color: var(--muted);
}

/* --- Meeting point --- */

.class-meet {
  padding-bottom: var(--section);
}

.class-meet__address {
  margin-bottom: 12px;
  font-weight: 700;
}

.class-meet__how {
  margin-bottom: 16px;
  color: var(--muted);
}

.class-meet__media {
  margin-block: 16px;
}

.class-meet__media img {
  width: 100%;
  border-radius: var(--radius);
}

/* --- FAQ --- */

.class-faq {
  padding-bottom: var(--section);
}

.class-faq__list {
  margin-top: 16px;
  border-top: 1px solid var(--line);
}

.class-faq__item {
  border-bottom: 1px solid var(--line);
}

.class-faq__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.class-faq__question::-webkit-details-marker {
  display: none;
}

.class-faq__chevron svg {
  width: 20px;
  height: 20px;
  transition: transform 0.2s ease;
}

.class-faq__item[open] .class-faq__chevron svg {
  transform: rotate(180deg);
}

.class-faq__answer {
  padding-bottom: 16px;
  color: var(--muted);
}

/* --- Full screen gallery viewer --- */

.class-viewer {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background-color: var(--night);
  color: var(--paper);
}

.class-viewer[open] {
  display: flex;
  flex-direction: column;
}

.class-viewer:not([open]) {
  display: none;
}

.class-viewer::backdrop {
  background-color: rgba(34, 27, 25, 0.8);
}

.class-viewer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px var(--gutter);
}

.class-viewer__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--paper);
}

.class-viewer__close svg {
  width: 24px;
  height: 24px;
}

.class-viewer__status {
  color: var(--tint-2);
}

.class-viewer__stage {
  display: grid;
  flex: 1;
  place-items: center;
  padding: 0 var(--gutter);
  overflow: hidden;
}

.class-viewer__stage img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius);
}

.class-viewer__nav {
  position: absolute;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.14);
  color: var(--paper);
  transform: translateY(-50%);
}

.class-viewer__nav--prev {
  left: 12px;
}

.class-viewer__nav--next {
  right: 12px;
}

.class-viewer__nav svg {
  width: 24px;
  height: 24px;
}

/* --- Tablet --- */

@media (min-width: 720px) {
  .class-facts__list {
    grid-template-columns: 1fr 1fr;
  }

  .class-make__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .class-incl {
    grid-template-columns: 1fr 1fr;
  }

  .class-viewer__nav--prev {
    left: 24px;
  }

  .class-viewer__nav--next {
    right: 24px;
  }
}

/* --- Desktop --- */

@media (min-width: 1024px) {
  .class-gallery__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    height: 460px;
    gap: 12px;
    overflow: visible;
  }

  /* The button and photo fill their grid cell, so both columns end on the same line. */
  .class-gallery__item {
    flex: none;
    min-height: 0;
  }

  .class-gallery__button {
    height: 100%;
  }

  .class-gallery__item.is-main {
    grid-row: span 2;
  }

  /* The grid has room for five photos; the rest open in the viewer. */
  .class-gallery__item:nth-child(n + 6) {
    display: none;
  }

  .class-gallery__item img {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
  }

  .class-gallery__all {
    position: absolute;
    right: var(--gutter);
    bottom: 24px;
    display: inline-flex;
  }

  .class-gallery__counter {
    display: none;
  }

  .class-layout {
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 48px;
    align-items: start;
  }

  .class-aside {
    display: block;
    position: sticky;
    top: calc(var(--header-h) + 16px);
    align-self: start;
  }

  .class-bar {
    display: none;
  }
}
