/*
 * Ølhalle Indhold: grundstil for lister og FAQ. Holder sig til temaets
 * skrifter og farver (currentColor) og lader temaet bestemme resten.
 */

.oh-indhold-note {
  display: inline-block;
  padding: 0 0.4em;
  border: 1px dashed currentColor;
  border-radius: 4px;
  font-size: 0.75em;
  opacity: 0.7;
}

.oh-indhold-placeholder {
  padding: 1em;
  border: 1px dashed currentColor;
  opacity: 0.6;
}

/* Liste ------------------------------------------------------------------- */

.oh-liste__heading {
  margin: 0 0 0.75em;
}

.oh-liste__section + .oh-liste__section {
  margin-top: 2em;
}

.oh-liste__title {
  margin: 0 0 0.5em;
}

.oh-liste__note {
  margin: -0.25em 0 0.75em;
  opacity: 0.75;
}

.oh-liste__items {
  list-style: none;
  margin: 0;
  padding: 0;
}

.oh-liste__item {
  display: flex;
  align-items: baseline;
  gap: 0.75em;
  padding: 0.45em 0;
  border-bottom: 1px solid color-mix(in srgb, currentColor 18%, transparent);
}

.oh-liste__item:last-child {
  border-bottom: 0;
}

.oh-liste__text {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 0 0.5em;
  min-width: 0;
}

.oh-liste__name {
  font-weight: 600;
}

.oh-liste__desc {
  flex-basis: 100%;
  font-size: 0.9em;
  opacity: 0.8;
}

.oh-liste__price {
  flex: 0 0 auto;
  white-space: nowrap;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* FAQ --------------------------------------------------------------------- */

.oh-faq__item {
  border-bottom: 1px solid color-mix(in srgb, currentColor 18%, transparent);
}

.oh-faq__item:first-child {
  border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent);
}

.oh-faq__question {
  cursor: pointer;
  padding: 0.9em 2em 0.9em 0;
  font-weight: 600;
  list-style: none;
  position: relative;
}

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

.oh-faq__question::after {
  content: "+";
  position: absolute;
  right: 0.25em;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 400;
  font-size: 1.4em;
  line-height: 1;
  opacity: 0.7;
  transition: transform 0.2s ease;
}

.oh-faq__item[open] > .oh-faq__question::after {
  transform: translateY(-50%) rotate(45deg);
}

.oh-faq__answer {
  padding: 0 0 1em;
}

.oh-faq__answer > :first-child {
  margin-top: 0;
}

.oh-faq__answer > :last-child {
  margin-bottom: 0;
}

@media (prefers-reduced-motion: reduce) {
  .oh-faq__question::after {
    transition: none;
  }
}

/* Send en forespørgsel (includes/forespoergsel.php, assets/forespoergsel.js) --
   Arver temaets skrift og tekstfarve, så formularen passer både på mørk og
   lys baggrund. Felterne er lyse med mørk tekst og mindst 16 px (ellers
   zoomer iPhone ind, når man trykker i feltet). */

/* Knappen: en pil, der vender, når formularen er foldet ud. */
.oh-foresp-knap__pil {
  display: inline-block;
  width: 1.15em;
  height: 1.15em;
  margin: -0.2em 0 0 0.6em;
  vertical-align: middle;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.oh-foresp-knap.is-open .oh-foresp-knap__pil {
  transform: rotate(180deg);
}

/* Formularen foldes ud under knappen: rækken går fra 0fr til 1fr, og
   indholdet glider let ned og toner frem. */
.oh-foresp {
  display: grid;
  grid-template-rows: 0fr;
  max-width: 40rem;
  transition: grid-template-rows 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.oh-foresp.is-open {
  grid-template-rows: 1fr;
}

.oh-foresp__inde {
  min-height: 0;
  overflow: hidden;
}

.oh-foresp.is-udfoldet .oh-foresp__inde {
  overflow: visible;
}

.oh-foresp__boks {
  padding-top: 1.75rem;
  opacity: 0;
  transform: translateY(-0.75rem);
  transition:
    opacity 0.3s ease,
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.oh-foresp.is-open .oh-foresp__boks {
  opacity: 1;
  transform: none;
  transition-delay: 0.08s;
}

@media (prefers-reduced-motion: reduce) {
  .oh-foresp,
  .oh-foresp__boks,
  .oh-foresp-knap__pil {
    transition: none !important;
  }
}

.oh-foresp [hidden] {
  display: none !important;
}

.oh-foresp__titel {
  margin: 0 0 0.4em;
  font-weight: 700;
  font-size: 1.35em;
  line-height: 1.2;
}

.oh-foresp__intro {
  margin: 0 0 1.25em;
  opacity: 0.85;
}

.oh-foresp__gitter {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 1rem;
}

@media (min-width: 600px) {
  .oh-foresp__gitter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.oh-foresp__felt {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin-bottom: 0.9rem;
}

.oh-foresp__felt label {
  margin-bottom: 0.3em;
  font-size: 0.95rem;
  font-weight: 600;
}

.oh-foresp__felt input,
.oh-foresp__felt textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  padding: 0.65em 0.8em;
  border: 1px solid rgba(0, 0, 0, 0.25);
  border-radius: 4px;
  background: #fbf8f3;
  color: #14261c;
  font: inherit;
  font-size: 16px;
  line-height: 1.4;
  -webkit-appearance: none;
  appearance: none;
}

.oh-foresp__felt textarea {
  min-height: 8rem;
  resize: vertical;
}

.oh-foresp__felt input::placeholder,
.oh-foresp__felt textarea::placeholder {
  color: #6b6b63;
}

.oh-foresp__felt input:focus,
.oh-foresp__felt textarea:focus {
  outline: 3px solid #c9a227;
  outline-offset: 1px;
}

.oh-foresp__felt [aria-invalid="true"] {
  border-color: #b3261e;
  box-shadow: 0 0 0 2px #b3261e;
}

.oh-foresp__fejl {
  margin: 0.3em 0 0;
  font-size: 0.9rem;
  font-weight: 600;
}

.oh-foresp__fejl:empty {
  display: none;
}

.oh-foresp__fejl--form {
  margin: 0 0 1rem;
}

.oh-foresp__skjult {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.oh-foresp__knapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-top: 0.5rem;
}

.oh-foresp__knapper .wp-block-button {
  margin: 0;
}

.oh-foresp__send {
  cursor: pointer;
  border: 0;
}

.oh-foresp__send:disabled {
  opacity: 0.7;
  cursor: wait;
}

.oh-foresp__annuller {
  min-height: 44px;
  padding: 0.5em 0.25em;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.oh-foresp__tak {
  padding: 1.25rem 0;
}

.oh-foresp__tak:focus {
  outline: none;
}

.oh-foresp__tak p {
  margin: 0 0 0.4em;
}

@media (max-width: 599px) {
  .oh-foresp__knapper .wp-block-button,
  .oh-foresp__send {
    width: 100%;
  }
}

/* Kalenderen i "Send en forespørgsel": sitets farver (mørkegrøn, creme,
   bordeaux) i stedet for browserens egen datovælger. */

.oh-kal-felt {
  position: relative;
}

.oh-foresp__felt input.oh-foresp__dato {
  padding-right: 2.75em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230c2e20' stroke-width='2' stroke-linecap='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='1.5'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85em center;
  background-size: 1.15em;
}

.oh-kal {
  position: absolute;
  z-index: 50;
  top: calc(100% + 0.35rem);
  left: 0;
  box-sizing: border-box;
  width: min(20.5rem, calc(100vw - 2rem));
  padding: 1rem 1rem 0.5rem;
  border: 1px solid #0c2e20;
  border-radius: 4px;
  background: #fbf8f3;
  color: #0c2e20;
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.45);
  font-family: inherit;
  animation: oh-kal-ind 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.oh-kal[hidden] {
  display: none !important;
}

@keyframes oh-kal-ind {
  from {
    opacity: 0;
    transform: translateY(-0.4rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .oh-kal {
    animation: none;
  }
}

.oh-kal__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.oh-kal__titel {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.oh-kal__pil {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: -0.5rem;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: none;
  color: #0c2e20;
  cursor: pointer;
}

.oh-kal__pil svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.oh-kal__pil:disabled {
  opacity: 0.25;
  cursor: default;
}

.oh-kal__ugedage,
.oh-kal__gitter {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
}

.oh-kal__ugedage {
  margin-bottom: 0.25rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(12, 46, 32, 0.15);
}

.oh-kal__ugedage span {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
  opacity: 0.6;
}

.oh-kal__dag {
  aspect-ratio: 1;
  min-height: 40px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: none;
  color: #0c2e20;
  font: inherit;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

@media (hover: hover) {
  .oh-kal__dag:not(:disabled):not(.is-valgt):hover,
  .oh-kal__pil:not(:disabled):hover {
    background: rgba(12, 46, 32, 0.09);
  }
}

.oh-kal__dag:focus-visible,
.oh-kal__pil:focus-visible,
.oh-kal__link:focus-visible {
  outline: 2px solid #c9a227;
  outline-offset: 1px;
}

.oh-kal__dag.is-idag {
  font-weight: 700;
  box-shadow: inset 0 0 0 1.5px #0c2e20;
}

.oh-kal__dag.is-valgt {
  background: #8b0000;
  color: #fff;
  font-weight: 700;
  box-shadow: none;
}

.oh-kal__dag:disabled {
  opacity: 0.28;
  cursor: default;
}

.oh-kal__bund {
  display: flex;
  justify-content: space-between;
  margin-top: 0.4rem;
  border-top: 1px solid rgba(12, 46, 32, 0.15);
}

.oh-kal__link {
  min-height: 44px;
  padding: 0 0.25rem;
  border: 0;
  background: none;
  color: #0c2e20;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}
