/* ============================================================
   Drink (beer, wine and spirits) product page. Rules are scoped under .drink-page,
   except the Personalise modal's, which renders inside the page. Dark mode:
   html[data-theme="dark"]. Hover: only under [data-whatintent="mouse"].
   ============================================================ */

.drink-page {
  --drink-divider: #e7e7e7;
  --drink-panel-bg: #f2f2f2;
  --drink-frame-bg: #d9d9d9;
  --drink-muted: #787878;
  --drink-amber: #ffbe36;
  --drink-link: #2a5ea9;
  width: 100%;
  line-height: var(--line-height-body);
}
html[data-theme="dark"] .drink-page {
  --drink-divider: #3a3a3a;
  --drink-panel-bg: #2a2a2a;
  --drink-frame-bg: #3a3a3a;
  --drink-muted: #a0a0a0;
  --drink-link: #4da3ff;
}

/* Stars everywhere on the page (strip, panel, comments): brand amber, both themes */
.drink-page .rating {
  color: var(--drink-amber);
}

/* ---------- Section headings ---------- */
.drink-heading {
  font-size: var(--font-size-plus-2);
  font-weight: 700;
  line-height: var(--line-height-heading);
  margin: 0 0 1rem;
}

/* ---------- Title ---------- */
.drink-title__name {
  font-size: var(--font-size-plus-3);
  font-weight: 700;
  line-height: var(--line-height-heading);
  margin: 0;
}

/* ---------- Hero: bottle column and action column ---------- */
/* Bottle and action list sit side by side while the column fits both, else wrap
   to full width; the 100 : 1 grow factors give the bottle nearly all spare width. */
.drink-hero {
  display: flex;
  flex-flow: row wrap;
  align-items: flex-start;
  gap: 1rem;
}
.drink-hero__media {
  position: relative;
  flex: 100 1 164px;
  min-width: 0;
}
/* keeps the absolutely placed discs inside the hero when the image is short */
.drink-hero__media--badges {
  min-height: calc(1.25rem + 132px + 0.375rem);
}
/* capped at 316 px tall, centred in its column */
.drink-hero__bottle {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 316px;
  margin: 0 auto;
}
/* Badge discs stacked near the hero top, overlapping the bottle's right edge */
.drink-hero__badges {
  position: absolute;
  top: 1.25rem;
  left: calc(50% + 1.375rem);
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.drink-hero__badge {
  display: block;
  width: 66px;
  height: 66px;
  object-fit: contain;
}

/* Action rows: the same rows as the cocktail recipe's personalisation controls
   (php-phalcon-cocktail cocktail.css, .cocktail-personalisation-controls*). Each
   control is core's button component, unstyled + light + small (14px icon, 8px
   icon-to-label gap, 14px regular label, page text colour);
   the rows here only add the cocktail list's spacing: 8px between rows, 4px under
   each control, a 1px #dcdfe1 rule under every row but the last (in both themes,
   as on the cocktail page). */
.drink-actions {
  flex: 1 1 168px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.drink-actions__item {
  position: relative;
  margin: 0;
  padding: 0 0 4px;
  border-bottom: 1px solid #dcdfe1;
}
.drink-actions__item:last-child {
  border-bottom: 0;
}
/* One deliberate difference from the cocktail rows: drink labels can be long
   ("See more Honey herbal whisky liqueurs", "View 63 cocktails with ..."), so
   they wrap instead of taking core's one-line ellipsis, which would hide where
   the link goes. The icon is top-aligned and nudged down by half the label's
   leading (line-height 1.1 => 0.05em), so a one-line row is identical to the
   cocktail's centred row and a wrapped one keeps the icon on its first line.
   Two classes, so these win over core's button stylesheet whatever the load order. */
.drink-actions .drink-actions__link {
  max-width: 100%;
  align-items: flex-start;
  text-align: left;
}
.drink-actions .drink-actions__icon {
  margin-top: 0.05em;
}
.drink-actions .drink-actions__label {
  white-space: normal;
  overflow: visible;
  overflow-wrap: anywhere;
}
/* arrow-up-right, the house external mark: 1em, dimmed, inline after the label so it wraps with it. */
.drink-actions .drink-actions__external {
  display: inline-block;
  margin-left: 0.25em;
  vertical-align: middle;
  opacity: 0.5;
}
.drink-actions .drink-actions__external .svg-icon {
  display: block;
  width: 1em;
  height: 1em;
}
[data-whatintent="mouse"] .drink-actions__link:not([disabled]):not([aria-busy="true"]):hover .drink-actions__label {
  text-decoration: underline;
}

/* ---------- Member rows ---------- */
/* signed out every member row is a POST /login form around the row button */
.drink-actions__form {
  margin: 0;
}
/* a write in flight (like / wish list disable the button, the cabinet toggle sets aria-busy) */
.drink-actions__link[disabled],
.drink-actions__link[aria-busy="true"] {
  cursor: default;
}
/* Actioned rows show core's check-circle badge, in brand amber, on the top-right
   corner of the 14px icon: the cocktail page's badge (10px disc, 3px above and
   9px in from the row's top-left) on a disc of the page background. */
.drink-actions__check {
  display: none;
}
.drink-actions__item--actioned .drink-actions__check {
  display: flex;
  position: absolute;
  top: -3px;
  left: 9px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--drink-amber);
  pointer-events: none;
}
html[data-theme="dark"] .drink-actions__item--actioned .drink-actions__check {
  background: #1a1a1a;
}
.drink-actions__check .svg-icon {
  display: block;
  width: 10px;
  height: 10px;
  max-width: none;
  max-height: none;
}

/* Rating picker (dropdown #js-drink-dropdown-rate): "4.5 ─ Excellent" with the value
   in a fixed slot so the dashes line up; the long list scrolls inside the panel. */
.drink-rating-options {
  display: flex;
  flex-direction: column;
  max-height: min(24rem, 60vh);
  overflow-y: auto;
}
.drink-rating-options__option {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 0.25rem;
  position: relative;
  min-height: 2.75rem;
  padding: 0.5rem 3rem 0.5rem 0.5rem;
  margin: 0;
  border: 0;
  border-radius: 0.25rem;
  background: none;
  color: inherit;
  font: inherit;
  font-size: var(--font-size-base);
  font-weight: 500;
  line-height: var(--line-height-default);
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}
.drink-rating-options__option--selected {
  font-weight: 700;
}
.drink-rating-options__option[disabled] {
  cursor: progress;
}
.drink-rating-options__value {
  min-width: 2rem;
}
.drink-rating-options__info {
  font-weight: 400;
  color: var(--drink-muted);
}
.drink-rating-options__check,
.drink-rating-options__loading {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
}
.drink-rating-options__check {
  color: var(--drink-amber);
}
.drink-rating-options__check .svg-icon,
.drink-rating-options__loading .svg-icon {
  display: block;
  width: 1rem;
  height: 1rem;
}
[data-whatintent="mouse"] .drink-rating-options__option:not([disabled]):hover {
  background: #f3f3f3;
}
html[data-theme="dark"][data-whatintent="mouse"] .drink-rating-options__option:not([disabled]):hover {
  background: #333333;
}
.drink-rating-options__error {
  margin: 0;
  padding: 0.25rem 0.5rem;
  font-size: var(--font-size-sub-1);
  white-space: normal;
  color: #ad0000;
}
html[data-theme="dark"] .drink-rating-options__error {
  color: #ff8a70;
}

/* ---------- "Your notes:" / "In your collections:" after the hero ---------- */
.drink-your-notes__line {
  margin: 0 0 0.5rem;
}
.drink-your-notes__line:last-child {
  margin-bottom: 0;
}
.drink-your-notes__heading {
  font-weight: 700;
}
/* nothing to show: drop the wrapper so it adds no gap */
.drink-your-notes:not(:has(.drink-your-notes__line:not(.hide))) {
  display: none;
}

/* ---------- "Update information/image" (end of Technical Details) ---------- */
.drink-update {
  margin: 1rem 0 0;
}
.drink-update__link {
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: var(--font-size-sub-1);
  line-height: var(--line-height-default);
  color: var(--drink-muted);
  text-decoration: underline;
  cursor: pointer;
}
[data-whatintent="mouse"] .drink-update__link:hover {
  text-decoration: none;
}

/* ---------- Byline under the title ---------- */
/* The margin is 1px over the 0.5rem gap on the other pages' title block because this line is tighter (line-height 1.1,
   not 1.25): the extra pixel keeps the title baseline to byline baseline distance the same as theirs. */
.drink-byline {
  margin: 0.5625rem 0 0;
  font-size: var(--font-size-sub-1);
  font-weight: 400;
  line-height: var(--line-height-default);
}
.drink-byline__author {
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
/* Byline text colour, both themes (inherited); the .drink-page prefix beats the global a / a:visited colours */
.drink-page .drink-byline__author,
.drink-page .drink-byline__author:visited {
  color: inherit;
}
[data-whatintent="mouse"] .drink-byline__author:hover {
  text-decoration: none;
}

/* ---------- Rating row under the byline: two blocks split by a hairline ---------- */
/* The first block takes its own width, the second the rest, so the blocks never wrap
   under each other and the divider always stands between them. */
.drink-ratings {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  margin-top: 1rem;
}
.drink-ratings--single {
  grid-template-columns: minmax(0, 1fr);
}
.drink-ratings__half {
  min-width: 0;
}
.drink-ratings__half + .drink-ratings__half {
  border-left: 1px solid var(--drink-divider);
  margin-left: 1rem;
  padding-left: 1rem;
}
.drink-ratings__label {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: var(--line-height-default);
}
.drink-ratings__row {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  column-gap: 0.375rem;
}
.drink-ratings__stars {
  display: inline-flex;
  margin-top: 0.25rem;
}
.drink-ratings__stars .rating {
  font-size: var(--font-size-base);
}
/* tighter stars: each item overlaps the next by a fifth of a star */
.drink-ratings__stars .rating__item + .rating__item {
  margin-left: -0.2em;
}
.drink-ratings__value,
.drink-ratings__count,
.drink-ratings__none,
.drink-ratings__reviews {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: var(--line-height-default);
}
.drink-ratings__count,
.drink-ratings__none {
  color: var(--drink-muted);
}
.drink-ratings__reviews {
  font-weight: 700;
}
/* Row text colour, both themes (inherited); the .drink-page prefix beats the global a / a:visited colours */
.drink-page .drink-ratings__reviews,
.drink-page .drink-ratings__reviews:visited {
  color: inherit;
}
[data-whatintent="mouse"] .drink-ratings__reviews:hover {
  text-decoration: underline;
}

/* ---------- Tasting: bold run-in labels ---------- */
.drink-tasting strong {
  font-weight: 700;
}

/* ---------- Write a review CTA ---------- */
/* bottom padding adds to the column gap before the next rule */
.drink-cta {
  padding-bottom: 1rem;
}
.drink-cta__box {
  position: relative;
  padding: 1rem;
  border: 2px solid var(--drink-amber);
  border-radius: 0.25rem;
}
/* amber "!" disc centred on the top border, near the right edge */
.drink-cta__disc {
  position: absolute;
  top: -0.625rem;
  right: 0.5rem;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--drink-amber);
  color: #333333;
  font-size: var(--font-size-plus-1);
  font-weight: 700;
  line-height: 19px;
  text-align: center;
  user-select: none;
}
.drink-cta__heading {
  margin: 0;
  font-size: var(--font-size-plus-1);
  font-weight: 700;
  line-height: var(--line-height-heading);
}
.drink-cta__text {
  margin: 0;
  font-size: var(--font-size-sub-1);
  line-height: var(--line-height-default);
}
.drink-cta__action {
  padding-top: 0.75rem;
}

/* ---------- Technical Details: H3 groups, inline label/value flow ---------- */
.drink-details__heading {
  margin: 1rem 0 0;
  font-size: var(--font-size-plus-1);
  font-weight: 700;
  line-height: var(--line-height-heading);
}
.drink-details > .drink-heading + .drink-details__heading {
  margin-top: 0;
}
.drink-details__list {
  margin: 0;
}
.drink-details__pair,
.drink-details__pair dt,
.drink-details__pair dd {
  display: inline;
  margin: 0;
  padding: 0;
}
.drink-details__pair dt {
  font-weight: 500;
}
.drink-details__pair dd {
  font-weight: 300;
}
.drink-details__more {
  margin: 0;
}
/* "View more sizes ▼": light body text with a solid triangle after it, as the design; the 2 px
   padding (cancelled by the margin) gives a 24 px target without moving the lines around it */
.drink-details__summary {
  display: block;
  width: fit-content;
  margin: -2px 0;
  padding: 2px 0;
  font-weight: 300;
  cursor: pointer;
  list-style: none;
}
.drink-details__summary::-webkit-details-marker {
  display: none;
}
.drink-details__summary:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
/* the design's ▼ is 0.7em x 0.6em, sat on the baseline 0.45em after the label */
.drink-details__chevron {
  display: inline-block;
  width: 0.7em;
  height: 0.6em;
  margin-left: 0.45em;
  vertical-align: -0.05em;
  transition: transform 0.2s ease;
}
/* core chevron-lg-down is a 2:1 triangle: drawn in the top half, then stretched to fill */
.drink-details__chevron .svg-icon {
  display: block;
  width: 100%;
  height: 50%;
  max-width: none;
  max-height: none;
  transform: scaleY(2);
  transform-origin: top;
}
.drink-details__more[open] .drink-details__chevron {
  transform: rotate(180deg);
}
[data-whatintent="mouse"] .drink-details__summary:hover {
  text-decoration: underline;
}
/* each other pack starts a new line, its pairs flowing like the first pack's */
.drink-details__pack {
  margin: 0.5rem 0 0;
}
@media (prefers-reduced-motion: reduce) {
  .drink-details__chevron {
    transition: none;
  }
}

/* ---------- Community ratings & reviews ---------- */
/* Overall panel: the score and "/5", then the stars with "Overall rating" and the count */
.drink-overall {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 4rem;
  padding: 0.5rem 1.5rem 0.5rem 1rem;
  background: var(--drink-panel-bg);
}
.drink-overall__value {
  display: flex;
  align-items: baseline;
  margin: 0;
  line-height: 1;
  white-space: nowrap;
}
.drink-overall__score {
  font-size: var(--font-size-plus-3);
  font-weight: 700;
}
.drink-overall__out-of {
  font-size: var(--font-size-plus-1);
  font-weight: 500;
  color: var(--drink-muted);
}
.drink-overall__detail {
  flex: 1 1 auto;
  min-width: 0;
}
.drink-overall__stars .rating {
  gap: 0;
}
/* tighter stars, as in the top ratings row: each overlaps the next by a fifth of a star (0.2 x the 1.5rem icon) */
.drink-overall__stars .rating__item + .rating__item {
  margin-left: -0.3rem;
}
.drink-overall__stars .rating__item .svg-icon {
  width: 1.5rem;
  height: 1.5rem;
  max-width: none;
}
.drink-overall__meta {
  display: flex;
  flex-flow: row wrap;
  justify-content: space-between;
  column-gap: 0.5rem;
  margin: 0.25rem 0 0;
  font-size: var(--font-size-sub-1);
  line-height: var(--line-height-default);
  color: var(--drink-muted);
}
.drink-overall__meta span:first-child {
  font-weight: 700;
}
.drink-overall-none {
  margin: 0;
}

/* Rate bar: core large block button below the panel */
.drink-rate {
  margin: 1rem 0;
}
/* The comments area and its modal: product-comments.css */
/* Stars beside each comment author (core's comment component, scoped to this page): same fifth-of-a-star overlap */
.drink-page .dg-component-comment__rating .rating__item + .rating__item {
  margin-left: -0.2em;
}

/* Personalise modal body: three sections split by a rule */
.drink-personalise__group {
  padding: 1.5rem 0;
  border-top: 3px solid #dcdfe1;
}
html[data-theme="dark"] .drink-personalise__group {
  border-top-color: #3a3a3a;
}
.drink-personalise__group:last-child {
  padding-bottom: 0;
}
.drink-personalise__heading {
  margin: 0 0 0.5rem;
  font-size: var(--font-size-base);
  font-weight: 700;
  line-height: var(--line-height-heading);
}
.drink-personalise__options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.drink-personalise__group .drink-modal-actions {
  padding-top: 0.5rem;
}
.drink-personalise__premium {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0;
}
.drink-personalise__lock {
  display: inline-flex;
  flex-shrink: 0;
  padding-top: 0.125rem;
}
.drink-personalise__lock .svg-icon {
  width: 1rem;
  height: 1rem;
}
.drink-personalise__empty {
  margin: 0;
}

/* Personalise modal action row */
.drink-modal-actions {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding-top: 1rem;
}

/* ---------- Link tiles under About: "See more {category}" and "View N cocktails with {ingredient}" ---------- */
/* two equal columns (a lone tile takes the first), each a square image beside its text, the whole tile one link */
.drink-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
/* text colour and weight of the page, not the global bold link; .drink-page beats a / a:visited */
.drink-page .drink-links__tile,
.drink-page .drink-links__tile:visited {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-width: 0;
  color: inherit;
  font-size: var(--font-size-sub-1);
  font-weight: 400;
  line-height: var(--line-height-default);
}
.drink-links__image {
  flex: 0 0 auto;
  width: 4rem;
  height: 4rem;
  object-fit: cover;
}
/* a lifestyle photo fills the square (cover, no frame); the fallback cocktail image is a portrait
   cut-out on transparent, shown whole in the square on the soft frame core's link box gives product
   cut-outs (light in both themes) */
.drink-links__image--lifestyle {
  object-fit: cover;
}
.drink-links__image--cutout {
  box-sizing: border-box;
  padding: 2px;
  object-fit: contain;
  background: radial-gradient(circle, #fff 50%, #f3f3f3 100%);
}
.drink-links__text {
  min-width: 0;
  overflow-wrap: anywhere;
}
/* the lead is the link colour on its own line, the name follows in the text colour */
.drink-links__lead,
.drink-links__name {
  display: block;
}
.drink-page .drink-links__lead {
  color: var(--drink-link);
}
[data-whatintent="mouse"] .drink-links__tile:hover .drink-links__text {
  text-decoration: underline;
}

/* ---------- Layout: two columns from 640 px ---------- */
/* __rhs grows into the space beside the sidebar so both columns stay left-aligned
   with or without a shop; the hero stays side by side. */
@media (min-width: 640px) {
  .drink-page > .dg-layout-default__rhs {
    flex: 1 1 auto;
  }
  .drink-hero {
    flex-wrap: nowrap;
  }
  .drink-hero__media {
    flex: 0 0 60%;
  }
  .drink-actions {
    flex: 1 1 0;
  }
}

/* ---------- Right column: the shop panel (then the brand preview when shown) from 640 px ---------- */
@media (min-width: 640px) {
  .drink-right-column {
    align-self: flex-start;
  }
  .drink-shop-panel {
    padding: 1rem;
    background: #f6f6f6;
  }
  html[data-theme="dark"] .drink-shop-panel {
    background: #2a2a2a;
  }
}
