/**
 * Deliberately minimal. Inherits the theme's typography and colours; every
 * value below is a custom property so GenerateBlocks can override it without
 * fighting specificity. Dequeue 'vlink-lounas' if you'd rather style it all
 * from scratch.
 */

.vlink-lounas {
  --vlink-lounas-rule: rgba(0, 0, 0, 0.12);
  --vlink-lounas-muted: rgba(0, 0, 0, 0.6);
  --vlink-lounas-accent: currentColor;
  --vlink-lounas-today-bg: rgba(0, 0, 0, 0.04);
  --vlink-lounas-gap: 1.5rem;
  --vlink-lounas-col-min: 12rem;
  background: var(--puuteri);
  border-radius: 25px 0 0 0;
}

.vlink-lounas__h-container {
  padding: 20px 40px 15px;
  background: var(--pinkki);
  border-radius: 25px 0;
  margin-bottom: 25px;
}
.vlink-lounas__heading {
  margin: 0 0 0.25em;
  color: white;
  font-size: 24px;
}

.vlink-lounas__range,
.vlink-lounas__note {
  margin: 0 0 var(--vlink-lounas-gap);
  color: var(--vlink-lounas-muted);
}

.vlink-lounas__note {
  font-style: italic;
}

.vlink-lounas__days {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(var(--vlink-lounas-col-min), 1fr)
  );
  gap: var(--vlink-lounas-gap);
}

.vlink-lounas__day {
  padding: 0.9rem;
  margin: 0 25px;
  border-radius: 25px 0 25px 0;
}

.vlink-lounas__day-name {
  font-size: 1.3em;
  margin-bottom: 10px;
  margin-top: 10px;
}

.vlink-lounas__day-date {
  margin-left: 0.4em;
  font-weight: 400;
  color: var(--vlink-lounas-muted);
}

.vlink-lounas__day-content > :first-child {
  margin-top: 0;
}

.vlink-lounas__day-content > :last-child {
  margin-bottom: 0;
}

.vlink-lounas__day.is-today {
  background: #fff;
}

/*
 * No list for the week: the frame stays and the message sits where the days
 * would be. It reuses __heading for the type scale, so it has to take that
 * rule's white back off - it is on the page background here, not on the pink
 * header. Inherited rather than hardcoded, so it follows the theme's text
 * colour like everything else in this file.
 */
.vlink-lounas__days > .vlink-lounas__fallback {
  margin: 0;
  padding: 40px;
  color: inherit;
}

.vlink-lounas__legend {
  margin-top: var(--vlink-lounas-gap);
  border-top: 1px solid var(--vlink-lounas-rule);
  color: var(--vlink-lounas-muted);
  font-size: 0.85em;
  line-height: 1.5;
  margin-left: 38px;
  margin-right: 38px;
  padding-top: 40px;
  padding-bottom: 40px;
}

.vlink-lounas__legend > :first-child {
  margin-top: 0;
}

.vlink-lounas__legend > :last-child {
  margin-bottom: 0;
}

/*
 * Stacked layout (opt-in): days run top to bottom, each a collapsible
 * <details>. Fits a phone or a narrow content column; classic column grid is
 * untouched above.
 */
.vlink-lounas--stacked .vlink-lounas__days {
  display: block;
}

.vlink-lounas--stacked .vlink-lounas__day {
  padding: 0;
}

.vlink-lounas__day-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem;
  cursor: pointer;
  list-style: none;
}

/* Hide the native disclosure triangle; we draw our own arrow. */
.vlink-lounas__day-summary::-webkit-details-marker {
  display: none;
}

.vlink-lounas__day-summary::marker {
  content: "";
}

.vlink-lounas--stacked .vlink-lounas__day-name {
  font-size: 1.3em;
}

/* Chevron: points down when closed, flips up when the day is open. */
.vlink-lounas__day-arrow {
  flex: none;
  width: 0.6em;
  height: 0.6em;
  margin-right: 0.2em;
  border-right: 2px solid var(--vlink-lounas-accent);
  border-bottom: 2px solid var(--vlink-lounas-accent);
  transform: translateY(-0.15em) rotate(45deg);
  transition: transform 0.15s ease;
}

.vlink-lounas__day[open] .vlink-lounas__day-arrow {
  transform: translateY(0.1em) rotate(-135deg);
}

.vlink-lounas--stacked .vlink-lounas__day-content {
  padding: 0 0.9rem 0.9rem;
}

/*
 * Today layout (shortcode-only): one day, no grid, no week chrome. Reuses the
 * day-name, day-date and day-content rules above, so all it needs of its own is
 * the padding the grid used to provide and a muted "next lunch" line.
 */
.vlink-lounas--today {
  padding: unset;
  background: unset;
}

.vlink-lounas--today .vlink-lounas__day-name {
  margin-top: 0;
}

.vlink-lounas--today .vlink-lounas__next,
.vlink-lounas--today .vlink-lounas__fallback {
  margin: 0;
  color: var(--vlink-lounas-muted);
}

/* Set by lounas.js when a cached page serves the wrong day; see the note there. */
.vlink-lounas[hidden] {
  display: none;
}

@media (max-width: 767px) {
  .vlink-lounas__h-container {
    padding: 20px 25px 15px;
  }
  .vlink-lounas__day {
    margin: 0 10px;
  }
  .vlink-lounas__legend {
    margin-left: 25px;
    margin-right: 25px;
  }
  .vlink-lounas__days > .vlink-lounas__fallback {
    padding: 25px;
  }
}
