/* etick-content-block.css — CR-P010 T-B
 *
 * The layout half of the generic content block. Plain CSS on purpose: this
 * plugin has no build step (its charter says so), so no Tailwind class here can
 * be assumed to exist in the stylesheet that was copied across in CR-P009 T-C.
 *
 * THE ONE RULE THIS FILE EXISTS TO KEEP: every layout is the right shape before
 * any script runs. Each block prints --etick-per and --etick-gap beside its own
 * markup, with the three breakpoints, and everything below sizes from those. No
 * script writes a width, so nothing re-lays itself in front of the reader the
 * way Splide's did before CR-P008 T-B.
 *
 * Selectors hang off [data-layout] rather than off a class per mode, because
 * data-layout is the one value that decides how a set of items looks — the same
 * value the script switches on and the editor will set in T-C. Adding a way of
 * showing items should be a rule here and a case there, and nothing else.
 */

.etick-content {
  --etick-per: 1;
  --etick-gap: 1rem;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.etick-content *,
.etick-content *::before,
.etick-content *::after {
  box-sizing: border-box;
}

.etick-content__empty {
  margin: 0;
  padding: 1rem 0;
  color: var(--etick-secondary);
  font-size: 0.9rem;
}

/* --- the row shared by grid and flipbox --------------------------------
   Both are the same row of equal columns; what differs is what sits in a
   cell. That is the argument of this whole change, so they share the rule
   rather than each carrying a copy of it. */

.etick-content[data-layout='grid'] .etick-content__row,
.etick-content[data-layout='flipbox'] .etick-content__row,
.etick-content[data-layout='banner'] .etick-content__row {
  display: grid;
  grid-template-columns: repeat(var(--etick-per), minmax(0, 1fr));
  gap: var(--etick-gap);
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* A row of a grid that slides row by row on a phone (CR-P137 T-A). Everywhere
   but a phone it is not there at all as far as layout goes: display: contents
   hands its cards to the grid above, so a computer and a tablet lay them out
   exactly as if the wrapper had never been printed - including a tablet count
   that wraps them differently from the rows it groups. Only the phone rules,
   beside the CR-P129 swipe, give it a box. */
.etick-content__slide-row {
  display: contents;
}

/* --- the card, used by grid and by slider ------------------------------ */

.etick-content__card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--etick-additional);
  border-radius: 12px;
  background: var(--etick-background);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  color: inherit;
  text-decoration: none;
  transition: box-shadow 0.28s ease, transform 0.28s ease;
}

a.etick-content__card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.14);
}

a.etick-content__card:focus-visible {
  outline: 3px solid #0bf;
  outline-offset: 3px;
}

.etick-content__media-wrap {
  position: relative;
}

/* CR-P129 T-A. The picture rounded on all four corners, for a grid that asks.

   THE RADIUS GOES ON THE WRAPPER, NOT ON THE IMG. The wrapper is exactly the
   picture's box - the img inside is width:100% - and it is also what the badge
   is positioned against, so rounding here rounds the picture AND anything laid
   over it as one shape. It is what the reference does too: its img carries no
   radius at all and its wrapper carries the whole of it.

   12px IS THE CARD'S OWN RADIUS, read off .etick-content__card above rather
   than copied off the reference, which uses 16. One radius on a page beats two.
   If the card's ever moves, move this with it.

   overflow: hidden IS WHAT DOES THE CLIPPING and the wrapper has never had it.
   It cannot reach the badge: that sits at top 12px / left 12px, which is the
   centre of a 12px corner arc and therefore inside the clip by construction.

   HARMLESS ON THE TWO CARDS WHERE IT CHANGES NOTHING, which is why neither is
   excluded. With "Show only the picture" on there is no card body, and on the
   popular trip look the wrapper is inset:0 over the whole card - in both the
   card itself already rounds all four corners at this same 12px, so this rule
   redraws the same shape. Excluding them would be more selector for no
   difference. */
.etick-content[data-image-round='1'] .etick-content__media-wrap {
  overflow: hidden;
  border-radius: 12px;
}

/* AND THE PICTURE ITSELF, WHICH IS NOT THE SAME THING - the first pass of
   CR-P129 T-A missed it and the owner caught it against the Offers row: "the
   first card is not rounded, 2 & 3 worked fine."

   WHY ONE CARD IN THREE. Rounding the WRAPPER rounds the BOX, and a clip can
   only cut a picture that reaches the corner being cut. Offers shows the whole
   picture - image_fit contain - in a 2:1 box, and its three preset pictures are
   not all 2:1: payday and raya are 584x292, exactly 2:1, so they fill the box
   edge to edge and the clip bites. jomnaikbas is 540x288, which is 1.875, so it
   is fitted by height and sits with about 11px of blank down each side, never
   touching the corners the wrapper is rounding. Nothing was wrong with the rule
   - it was rounding a box the picture did not fill.

   SO THE RADIUS GOES ON THE IMG TOO, and the picture is then rounded as an
   OBJECT rather than as whatever shape it happens to fill. That is what the
   setting promises on the form, and it now holds for every combination of fit
   and shape rather than only where the two agree.

   BOTH RULES STAY, because each covers what the other cannot. This one rounds
   the picture when it does not fill its box. The wrapper one clips everything
   laid OVER the picture to the same shape - the badge, and the trip card's dark
   gradient - which a radius on the img alone would leave square. */
.etick-content[data-image-round='1'] .etick-content__image {
  border-radius: 12px;
}

/* A fixed picture height, not an aspect ratio worked out after loading. The
   card takes up its final room before the picture arrives, so nothing below it
   moves when it does. */
.etick-content__image {
  display: block;
  width: 100%;
  height: var(--etick-image-h, 180px);
  object-fit: var(--etick-image-fit, cover);
}

/* --- where the whole picture is shown, it sits at the TOP of its box ---
   CR-P113 T-A, from the owner's answer to Q-P113-3 ("Only where the whole
   picture is shown").

   THE FAULT THIS FIXES, measured rather than described: a picture shown whole
   is centred in its box by default, so the space the picture does not fill is
   split above and below it. Two cards side by side then start their pictures at
   DIFFERENT heights whenever the two pictures are different shapes - at 390px
   two Offers cards sat 36.6px and 33.7px down from the top of their boxes, which
   reads as two cards that do not line up. Pushing the leftover to the bottom
   makes every picture start at the same place, and the difference collects where
   it looks like padding instead.

   ONLY THE TWO FITS THAT LEAVE SPACE. 'cover' and 'fill' cover the whole box, so
   there is nothing to align and no rule here would do anything; 'contain' and
   'scale-down' are the two that letterbox. Both are listed rather than just
   'contain', because they leave the same gap for the same reason and fixing one
   would leave the identical fault under the other.

   A TOOL THAT HAS NEVER STORED image_fit HAS NO ATTRIBUTE and is untouched -
   see the note above $etick_image_fit_attr in render.php. That is what keeps
   this off every tool that did not ask to be shown whole.

   THE TRIP CARD KEEPS ITS CENTRING, and that is deliberate rather than missed:
   [data-card-template='trip'] sets object-position: center on its own picture
   further down this file, at equal specificity and later in source order, so it
   wins. There the picture is a backdrop behind the words rather than a picture
   in a box, and centring is what that wants. */
/* THE MARK IS NOT IN THIS LIST, AND WAS UNTIL CR-P128. It was
   .etick-content__mark-img in both fits, and that reversal is deliberate rather
   than a tidy-up: the argument above is about a ROW OF CARD PICTURES of
   different heights, which want their tops on one line so the leftover collects
   underneath as padding. A mark is not that. It is a small drawing centred in a
   fixed 42px decorative tile, on its own, with no neighbour to line up with - so
   top-pinning it bought nothing and cost the centring.

   IT SHOWED AS FOUR DIFFERENT HEIGHTS, not as one wrong one, which is why it sat
   unnoticed through CR-P113 and CR-P114. The <img> is dead centre in the tile on
   both axes; it is the DRAWING inside the img that was pinned. How far it rode
   up depended on the file's own shape, so the four USP icons (20x16, 22x16,
   16x20, 24x12 in a 22x22 box) sat 2.2, 3.0, 0.0 and 5.5px above their tile
   centres - the flattest worst, one of them already correct.

   NOT AN OVERRIDE, AND NOT CR-P114'S TOGGLE. Nothing sets object-position on the
   mark now, so it falls back to the initial 50% 50%, which is what is wanted; an
   override further down would have left the wrong rule here for the next person.
   CR-P114's "Centre the picture in its box" was considered and is the wrong
   tool: it is opt-in, and a picture sometimes wants its top while a glyph in a
   tile always wants its middle. If a banner tool ever does want a top-pinned
   mark, that toggle is where it belongs. */
.etick-content[data-image-fit='contain'] .etick-content__image,
.etick-content[data-image-fit='scale-down'] .etick-content__image,
.etick-content[data-image-fit='contain'] .etick-content__flip-image,
.etick-content[data-image-fit='scale-down'] .etick-content__flip-image,
.etick-content[data-image-fit='contain'] .etick-content__full-image,
.etick-content[data-image-fit='scale-down'] .etick-content__full-image {
  object-position: top;
}

/* --- except where the tool ticks Centre the picture in its box ---
   CR-P114 T-A, from the owner looking at the operator logos again. The rule
   above is right for a row of cards and wrong for a row of LOGOS: seven marks
   of seven shapes pinned to the top of a 100px strip read as seven that have
   each slipped. This is the per-tool way out of it.

   IT MUST STAY BELOW THE RULE IT OVERRIDES, and that is not a preference -
   both selectors are class + attribute + class, specificity (0,3,0) each, so
   SOURCE ORDER IS THE ONLY THING DECIDING between them. A tidy-up that sorts
   this file, or moves this block above the one it answers, silently undoes
   this CR and nothing will fail to warn you.

   ONE LAYOUT CAN EVER CARRY IT. render.php prints data-center-image on the
   slider root only, because the slider is the only layout offering the tick -
   the same argument CR-P109 wrote for data-center. The Offers card looks live
   on that same carousel and keep the top alignment: they do not tick this.

   .etick-content__image is the class etick_cms_content_media() emits, which is
   the whole of an image_only card and the picture of every other one. The flip,
   full and mark pictures above are deliberately not listed - no layout drawing
   those offers this tick. */
.etick-content[data-center-image='1'] .etick-content__image {
  object-position: center;
}

.etick-content__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  border-radius: 999px;
  background: var(--etick-accent);
  padding: 0.34rem 0.62rem;
  color: var(--etick-accent-contrast);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.etick-content__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1rem 1.1rem 1.15rem;
}

/*
 * CR-P109 T-A. Everything in the card down the middle, when the tool asks for
 * it. render.php prints data-center ONLY when the tick is on, so a tool that
 * never touches it gains neither the attribute nor a single declaration.
 *
 * TWO PROPERTIES, NOT ONE. The body is a flex COLUMN, so text-align alone
 * centres the words but leaves anything that is its own box — a button, a code
 * pill — stretched across the full width. align-items brings those in too.
 *
 * NOTHING HERE FOR THE PICTURE, deliberately. The media box already fills the
 * card's width and image_fit does the centring inside it, so a rule for it
 * would be a rule that does nothing.
 *
 * IT CANNOT FIGHT A CARD LOOK. The tick is offered on the grid alone, a grid
 * offers only the ordinary card and the trip card, and the trip card already
 * sets these same two values on this same element further down this file. The
 * offers looks — one of which deliberately aligns LEFT — belong to the carousel
 * and can never carry this attribute. Widening the tick to another layout means
 * checking that again.
 */
.etick-content[data-center='1'] .etick-content__body {
  align-items: center;
  text-align: center;
}

/* CR-P107 T-A: --etick-title-size is printed by render.php ONLY when the Title
   size setting has been moved off its default, so the 1.05rem fallback is what
   every existing tool keeps drawing, unchanged. */
/* CR-P133 T-A adds the weight on the same terms, and THE FALLBACK IS THE
   LOAD-BEARING PART. 800 is what this rule drew before the variable existed, so
   a tool that has never chosen a weight goes on drawing 800 - the declaration is
   simply absent. The trip card's own rule further down carries 700 as ITS
   fallback for the same reason. Neither number may be "tidied" into agreeing
   with the other: they are what those two looks already drew. */
.etick-content__title {
  margin: 0;
  color: var(--etick-primary-second);
  font-size: var(--etick-title-size, 1.05rem);
  font-weight: var(--etick-title-weight, 800);
  line-height: 1.32;
}

.etick-content__subtitle {
  margin: 0;
  color: var(--etick-accent);
  font-size: 0.86rem;
  font-weight: 700;
}

/* CR-P133 T-A (Q-P133-1): --etick-desc-size on the same terms as the title's
   size above. The 0.92rem fallback is what every existing tool keeps drawing, to
   the pixel rather than to the rounded 15 the setting defaults to.

   ONE RULE IS ENOUGH FOR THIS ONE, unlike the title. Nothing overrides this
   font-size at a higher specificity where a grid setting could reach it: the
   trip card sets this element's colour and shadow and leaves its size alone, and
   the two offers looks that do set a size are carousel-only. Checked rule by
   rule. */
.etick-content__desc {
  margin: 0;
  color: var(--etick-secondary);
  font-size: var(--etick-desc-size, 0.92rem);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

/* --- the second line drawn as a code (CR-P080 T-B) ---------------------
   Takes the place of .etick-content__subtitle when a tool turns show_code on,
   so it sits on the same line of the body and needs no reflow around it. */

.etick-content__code {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.etick-content__code-value {
  border: 1px dashed var(--etick-accent);
  border-radius: 8px;
  background: rgba(248, 132, 0, 0.08);
  padding: 0.2rem 0.55rem;
  color: var(--etick-accent);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}

.etick-content__code-copy {
  cursor: pointer;
  border: 0;
  border-radius: 999px;
  background: var(--etick-accent);
  padding: 0.24rem 0.7rem;
  color: var(--etick-accent-contrast);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.5;
  transition: background 0.2s ease;
}

.etick-content__code-copy:hover {
  background: var(--etick-primary-second);
}

/* A visible focus ring, because this is the first control the generic card has
   ever carried and the keyboard has to be able to see where it is. */
.etick-content__code-copy:focus-visible {
  outline: 2px solid var(--etick-primary-second);
  outline-offset: 2px;
}

.etick-content__code-copy.is-copied {
  background: #16a34a;
}

/* --- the description behind a View more (CR-P080 T-C) ------------------
   The paragraph carries the hidden attribute rather than a class, so it is
   already away in the first paint and the button's aria-expanded is the only
   copy of the state. Nothing here may set display on .etick-content__desc — it
   would beat hidden and leave the writing showing under a button that says
   View more. */

.etick-content__desc-toggle {
  align-self: flex-start;
  cursor: pointer;
  border: 0;
  border-radius: 999px;
  background: transparent;
  padding: 0.1rem 0;
  color: var(--etick-accent);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.5;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.etick-content__desc-toggle:hover {
  color: var(--etick-primary-second);
}

.etick-content__desc-toggle:focus-visible {
  outline: 2px solid var(--etick-primary-second);
  outline-offset: 2px;
}

/* --- Show all, on a phone only (CR-P080 T-E) ---------------------------
   The rule that hides the items past the cap is printed beside the block, in a
   max-width: 640px query. This is the other half of that boundary: above it
   nothing is hidden, so the control has nothing to reveal and must not be
   there. Marked !important because it is the one thing about this button that
   is not a matter of taste - a theme restyling buttons must not be able to put
   it back on a desktop. */

.etick-content__show-all {
  display: block;
  cursor: pointer;
  margin: 1rem auto 0;
  border: 1px solid var(--etick-accent);
  border-radius: 999px;
  background: transparent;
  padding: 0.45rem 1.4rem;
  color: var(--etick-accent);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.5;
  transition: background 0.2s ease, color 0.2s ease;
}

.etick-content__show-all:hover {
  background: var(--etick-accent);
  color: var(--etick-accent-contrast);
}

.etick-content__show-all:focus-visible {
  outline: 2px solid var(--etick-primary-second);
  outline-offset: 2px;
}

@media (min-width: 641px) {
  .etick-content__show-all {
    display: none !important;
  }
}

/* --- slider ------------------------------------------------------------
   The carousel's own stylesheet does the row; this only gives the slide the
   breathing space the promo block used to add by hand. */

.etick-content__slide {
  padding: 0.45rem;
}

.etick-content[data-layout='slider'] .etick-content__card {
  height: 100%;
}

/* --- accordion ---------------------------------------------------------
   Panels share one row and the open one takes the room. The panel that starts
   open is chosen server-side, so the row is already the right shape. */

.etick-content[data-layout='accordion'] .etick-content__panels {
  display: flex;
  gap: var(--etick-gap);
  height: var(--etick-panel-h, 400px);
  overflow: hidden;
}

.etick-content__panel {
  position: relative;
  flex: 0.5 1 0;
  overflow: hidden;
  border-radius: 6px;
  background-color: var(--etick-primary-second);
  background-position: center;
  background-size: cover;
  filter: brightness(0.5);
  transition: flex-grow 0.4s ease, filter 0.4s ease;
}

.etick-content__panel.is-open {
  flex-grow: 3;
  filter: brightness(1);
}

/* The whole panel is the button, so there is one thing to press and one thing
   to Tab to — not a strip of button inside a panel that also reacts. */
.etick-content__panel-head {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  border: 0;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
  padding: 0;
}

.etick-content__panel-head:focus-visible {
  outline: 3px solid #0bf;
  outline-offset: -5px;
}

/* Sideways down the closed panel, the way the terminal block has always shown
   the name of a panel that has no room for it. */
.etick-content__panel-name {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-90deg);
  max-width: 150px;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

.etick-content__panel.is-open .etick-content__panel-name {
  opacity: 0;
}

.etick-content__panel-body {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.6);
  color: #ffffff;
}

.etick-content__panel-body[hidden] {
  display: none;
}

.etick-content__panel-title {
  margin-bottom: 0.4rem;
  font-size: 1.2rem;
  font-weight: 700;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

.etick-content__panel-desc {
  font-size: 0.9rem;
  line-height: 1.4;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

.etick-content__panel-link {
  display: inline-block;
  margin-top: 0.6rem;
  border-radius: 4px;
  background: var(--etick-accent);
  padding: 0.42rem 0.85rem;
  color: var(--etick-accent-contrast);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
}

.etick-content__panel-link:focus-visible {
  outline: 3px solid #0bf;
  outline-offset: 3px;
}

/* --- flipbox ----------------------------------------------------------- */

/* WHAT SHAPE A CARD IS (CR-P131 T-A).
   A card is given a RATIO, not a height. It was given a height until this CR,
   and a height cannot hold a shape: the width comes from how many are across
   the row, so the same 260px that met a ~280px column at four across and read
   as a square met a ~170px column at two across on a phone and read as a tall
   portrait. That is what the owner reported. A ratio is the one form that
   survives the column changing width, so it needs no breakpoint of its own and
   there is no phone-only rule anywhere below.

   THE DEFAULT IS SQUARE AND THAT MOVES EVERY EXISTING FLIP ROW. Deliberate, and
   the owner's own answer to Q-P131-1 with the alternative offered. Elsewhere in
   this stylesheet the bare rule is always what a tool drew before the setting
   existed; here it is not, which is why it says so. The stored height is not
   deleted - it is simply unread until the shape below asks for it. */
.etick-content__flip {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  perspective: 1100px;
  cursor: pointer;
  text-align: inherit;
  font: inherit;
}

/* "Follow the picture". The ratio itself is printed per CARD, inline, because
   every card in a row can be a different shape - that is what the setting
   means. This rule exists for the card that had no picture to measure: it wins
   nothing over an inline aspect-ratio, and catches the card that has none, so
   an item with no picture is square instead of collapsing to a line. */
.etick-content[data-card-shape='image'] .etick-content__flip {
  aspect-ratio: 1 / 1;
}

/* "A height I set" - exactly what every flip card did before this CR, restored
   whole rather than approximated. Both declarations are needed: dropping the
   ratio is what hands the height back to min-height. */
.etick-content[data-card-shape='fixed'] .etick-content__flip {
  aspect-ratio: auto;
  min-height: var(--etick-card-h, 280px);
}

.etick-content__flip:focus-visible {
  outline: 3px solid #0bf;
  outline-offset: 4px;
}

.etick-content__flip-inner {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  min-height: inherit;
  transform-style: preserve-3d;
  transition: transform 0.65s ease;
}

/* WHAT TURNS A CARD OVER (CR-P140 T-A). Two different things, kept apart.

   A PRESS PINS IT. .is-flipped is the pinned state the script toggles, and
   aria-pressed says the same thing to a screen reader. It applies on every
   device, so it sits outside any media query.

   HOVER IS A QUICK LOOK, and only where hover exists. Until this CR the two
   shared one selector list, so what was drawn was "hovered OR pinned" - and a
   press nearly always lands while the pointer is on the card. On a computer
   the first click changed nothing visible and the second could not turn the
   card back until the pointer left. On a phone it was worse: a tap leaves
   :hover stuck on the card, so once tapped, a card could not be tapped back to
   its front at all. Both measured on the real homepage before this change.

   So hover sits behind (hover: hover), which a phone does not match, and it
   stands down on a card carrying .is-held - which the script adds on every
   press and takes off when the pointer leaves. A press therefore shows the
   pinned state at once, pointer or not, and hover comes back the next time
   the pointer arrives.

   NOT (pointer: fine) AS WELL. A touch laptop matches (hover: hover) and a
   finger tap on it leaves :hover stuck just as a phone does, but .is-held
   already covers that: a touch pointer leaves the card BEFORE its click fires,
   so the click puts .is-held back after that leave and the stuck hover is
   ignored. That order - leave, then click, on every tap - was measured
   rather than assumed. */
.etick-content__flip.is-flipped .etick-content__flip-inner {
  transform: rotateY(180deg);
}

@media (hover: hover) {
  .etick-content__flip:not(.is-held):hover .etick-content__flip-inner {
    transform: rotateY(180deg);
  }
}

.etick-content__flip-face {
  display: flex;
  position: absolute;
  inset: 0;
  align-items: stretch;
  justify-content: stretch;
  overflow: hidden;
  border-radius: 14px;
  background: var(--etick-front-bg, var(--etick-background));
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.14);
  backface-visibility: hidden;
}

.etick-content__flip-face--back {
  transform: rotateY(180deg);
  background: var(--etick-back-bg, var(--etick-background));
  color: var(--etick-back-text, inherit);
}

/* The back face sets a colour, but title, subtitle and description each set
   their own further down the cascade and win on specificity — which is why the
   Back writing colour setting looked dead: the writing stayed the colour it
   uses on a white card, drawn on a near-black back. Scoping by the back face
   beats the bare class without !important, and leaves the front face alone. */

/* --- the flip card's own half of the affiliate screen (CR-P091 T-C) -------
   Q-P091-1 sent the front-and-back pairs here. Same mechanism as Grid with
   title's: each var() falls back to what the face already drew, and render.php
   prints nothing unless the setting was moved.

   THE TITLE COLOURS DO NOT FOLLOW THE FACE COLOURS UNDER "No box", and this
   comment used to say they did (corrected in CR-P095 T-B, Q-P095-4). No rule
   here has ever neutralised --etick-front-title: the data-no-box rule above
   reaches the FACE, and the title goes on being painted over whatever the page
   is - the same place Back writing colour ends up, and left alone for the same
   reason. The owner settled it that way rather than change the drawing, so the
   setting keeps its row on the form and the hint that claimed otherwise is
   gone. Nothing below changed; only the description of it was wrong. */
.etick-content[data-layout='flipbox'] .etick-content__flip-face--front .etick-content__title {
  color: var(--etick-front-title, inherit);
}

.etick-content[data-layout='flipbox'] .etick-content__flip-face--front .etick-content__desc {
  font-size: var(--etick-front-text-size, 0.92rem);
}

.etick-content[data-layout='flipbox'] .etick-content__flip-face--back .etick-content__desc {
  font-size: var(--etick-back-text-size, 0.92rem);
}

/* WHICH WAY IT TURNS OVER. Sideways is what it has always done, so it needs no
   rule - the attribute is printed only for the other one. The back face has to
   be turned on the same axis as the card, or it faces away after the flip.
   Pinned and hover are split here exactly as they are for sideways above
   (CR-P140 T-A); these win over those on specificity, as they always have. */
.etick-content[data-flip='top-bottom'] .etick-content__flip.is-flipped .etick-content__flip-inner {
  transform: rotateX(180deg);
}

@media (hover: hover) {
  .etick-content[data-flip='top-bottom'] .etick-content__flip:not(.is-held):hover .etick-content__flip-inner {
    transform: rotateX(180deg);
  }
}

.etick-content[data-flip='top-bottom'] .etick-content__flip-face--back {
  transform: rotateX(180deg);
}

.etick-content__flip-face--back .etick-content__title {
  color: var(--etick-back-title, var(--etick-back-text, #ffffff));
}

.etick-content__flip-face--back .etick-content__title,
.etick-content__flip-face--back .etick-content__subtitle,
.etick-content__flip-face--back .etick-content__desc {
  color: var(--etick-back-text, inherit);
}

.etick-content__flip-image {
  width: 100%;
  height: 100%;
  object-fit: var(--etick-image-fit, cover);
}

/* THE BLANK SPACE ROUND THE WRITING IS A SHARE OF THE CARD, NOT A NUMBER
   (CR-P135 T-B, Q-P135-1 answered "shrink the blank space on small cards too").

   It was a flat 1.4rem at every card size. On a computer that is a comfortable
   margin on a 282px card; on a phone it was the same 22.4px on a card CR-P131
   made 167.5px square, so 44.8px - a quarter of the card - was blank and the
   words had 122.72px to wrap in. That is half of why the owner reported the
   back of a card as too small to read; T-A is the other half.

   A PERCENTAGE PADDING RESOLVES AGAINST THE CONTAINING BLOCK'S WIDTH - on all
   four sides, top and bottom included - and the containing block here is the
   flip face, which is the card. So 8% is 8% of the card, and the space follows
   the card at every width instead of at the two or three somebody thought to
   test. Same argument CR-P131 T-A made for a ratio over a height.

   1.4rem IS THE CEILING, NOT THE STARTING POINT, AND THAT IS THE WHOLE SAFETY
   OF THIS. 8% of 280px is 22.4px exactly, so 280px is the crossover: every card
   WIDER than that is clamped to the 1.4rem it already draws and cannot change,
   and only cards narrower than 280px give any space back. No card is ever given
   MORE blank space than it has today. A 282px desktop card computes 22.56 and
   is clamped to 22.4 - unchanged, not merely close.

   THE FLOOR STOPS IT VANISHING on a very narrow card: below 150px, 8% would be
   under 12px and the writing would run into the card's edge.

   IT REACHES BOTH FACES, DELIBERATELY. This is the flip face's only padded
   child and both faces use it, so a front face that draws writing rather than a
   picture gets the same treatment. The two faces are one card and should not
   pad differently. */
.etick-content__flip-text {
  --etick-flip-pad: clamp(12px, 8%, 1.4rem);

  display: flex;
  flex-direction: column;
  justify-content: center;
  /* WRITING THAT DOES NOT FIT IS CUT AT THE BOTTOM ONLY, NOT AT BOTH ENDS
     (CR-P136 T-A). `justify-content: center` centres overflow too, so a face
     with more writing than room spilled EQUALLY IN BOTH DIRECTIONS - measured
     at 375px as 22.58px lost off the top and 22.59px off the bottom, which put
     the TITLE half outside the card. A fade cannot help there: a heading sliced
     across the middle reads as broken however softly it ends.

     `safe` is the CSS keyword for exactly this: centre while there is room,
     align to the start when there is not. The plain `center` above stays as the
     fallback for anything that does not know the keyword, which then behaves as
     it does today rather than worse. Both declarations are needed; this is not
     a duplicate to tidy away. */
  justify-content: safe center;
  gap: 0.5rem;
  width: 100%;
  padding: var(--etick-flip-pad);

  /* THE FADE THAT SAYS "THERE IS MORE" (CR-P136 T-A, Q-P136-1 answered "Cut it
     off visibly, with a fade").

     WHY IT MASKS THE WRITING RATHER THAN PAINTING A GRADIENT OVER IT. A
     gradient to the face's own colour would need to know that colour, and with
     "No box around each item" the face is transparent (CR-P089) - so it would
     paint a colour that is not there, over whatever the page is. A mask fades
     the content itself and is right on every background.

     ON THE TEXT BLOCK, NOT ON THE FACE, AND THAT MATTERS. This element's box is
     exactly the face's box - it is a stretched flex item - but the face carries
     the BACKGROUND and the shadow. Masking the face would fade the card's
     bottom edge into the page. Masking this fades only what is written on it.

     THE BAND IS THE PADDING, WHICH IS WHAT MAKES THE FADE APPEAR ONLY WHEN
     SOMETHING IS ACTUALLY LOST - with no script and no way to ask CSS whether a
     thing overflows. Writing that fits stays inside the content box and so
     never enters the padding, so the band falls on blank space and nothing
     looks different. Writing that overflows spills through the padding and into
     the band, and fades. The condition is geometry rather than a measurement.

     ONE INEXACTNESS, STATED RATHER THAN LEFT TO BE FOUND: inside the gradient
     the 8% resolves against the box's HEIGHT, while in the padding it resolves
     against its WIDTH. On a square card - the default since CR-P131, and what
     this owner has - they are the same number. On a card given a set height the
     band can be a little taller than the padding, so writing that exactly
     reaches the content edge may dim slightly in its last few pixels. Visible
     only if looked for, and the alternative was a second hard-coded length that
     would drift from the padding the first time either moved. */
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - var(--etick-flip-pad)), transparent 100%);
  mask-image: linear-gradient(to bottom, #000 calc(100% - var(--etick-flip-pad)), transparent 100%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

/* --- banner ------------------------------------------------------------ */

.etick-content[data-layout='banner'] .etick-content__banner {
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
  padding: 1rem;
}

.etick-content__banner-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  min-width: 0;
  padding: 0.55rem 0.75rem;
}

.etick-content__mark {
  display: inline-flex;
  flex: 0 0 42px;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #fff8f1;
}

/* No background of its own (CR-P088). It used to paint var(--etick-background)
   here, which reads white on every palette shipped so far, so an item with a
   picture lost the pale orange tile an item with a drawn icon keeps. That was
   invisible while the items on the home page carried no pictures; the preset
   content all does, so the whole row went white and the owner asked for the
   orange back. The border and the inner edge stay - they are what give a
   picture a shape to sit in, and they were never the complaint. */
.etick-content__mark.is-image {
  border: 1px solid var(--etick-additional);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--etick-accent) 12%, transparent);
}

/* The mark is drawn by the usp block's own icon renderer, so the shape cannot
   drift between the two. Only its size belongs to this layout. */
.etick-content__mark .etick-usp-svg,
.etick-content__mark-img {
  display: block;
  width: 22px;
  height: 22px;
}

.etick-content__mark .etick-usp-svg {
  color: var(--etick-accent);
  fill: none;
  stroke: currentColor;
}

.etick-content__mark-img {
  object-fit: contain;
}

.etick-content__banner-text {
  min-width: 0;
  margin: 0;
  color: var(--etick-banner-title, var(--etick-primary-second));
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

/* --- Grid with title takes the affiliate card's customisation (CR-P091 T-C) --
   THE FALLBACK IN EVERY var() BELOW IS THE VALUE THIS LAYOUT ALREADY DREW.
   render.php prints one of these properties only when the setting has been moved
   off its default, so a tool nobody re-saves resolves every one of them to what
   it resolved to before this task existed. That is the whole mechanism keeping
   ten new settings from touching a single existing tool. */

/* The panel is a tick, not a colour - see the note on the setting. Without the
   tick there is no background here at all, which is how it has always been. */
.etick-content[data-panel='1'] .etick-content__banner-item {
  border-radius: 12px;
  background: var(--etick-banner-panel-bg, #ffffff);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.08);
  padding: 1rem 1.1rem;
}

/* The writing under the title. It only exists once a description has been typed,
   so this rule has nothing to act on in a tool that predates the field. */
.etick-content__banner-body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.35rem;
}

.etick-content__banner-desc {
  margin: 0;
  color: var(--etick-banner-text, var(--etick-secondary));
  font-size: var(--etick-banner-text-size, 0.95rem);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

/* --- the button Grid with title has never had ---------------------------
   The five styles are the affiliate screen's own list. Each is the same shape in
   a different dress, so they share everything but their fill and their edge. */
.etick-content__banner-cta {
  align-self: flex-start;
  margin-top: 0.15rem;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--etick-banner-cta, #2563eb);
  padding: 0.42rem 0.85rem;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  transition: filter 0.2s ease, background 0.2s ease;
}

.etick-content__banner-cta:hover {
  filter: brightness(0.94);
}

.etick-content__banner-cta:focus-visible {
  outline: 2px solid var(--etick-banner-cta, #2563eb);
  outline-offset: 2px;
}

.etick-content[data-cta-style='pill'] .etick-content__banner-cta {
  border-radius: 999px;
}

.etick-content[data-cta-style='outline'] .etick-content__banner-cta {
  border-color: var(--etick-banner-cta, #2563eb);
  background: transparent;
  color: var(--etick-banner-cta, #2563eb);
}

.etick-content[data-cta-style='ghost'] .etick-content__banner-cta {
  background: transparent;
  padding-left: 0;
  padding-right: 0;
  color: var(--etick-banner-cta, #2563eb);
}

.etick-content[data-cta-style='gradient'] .etick-content__banner-cta {
  background: linear-gradient(135deg,
    var(--etick-banner-cta, #2563eb),
    color-mix(in srgb, var(--etick-banner-cta, #2563eb) 55%, #000000));
}

/* CR-P126 T-A. The button below has been centred here since the setting
   existed, on the strength of the comment under this one claiming the writing
   above it was centred too. It was not - the item centres its BOXES on the
   cross axis, and the glyphs inside them stayed at text-align: start. A
   one-line title hid that, because a box shrunk to its content reads as centred
   whatever its text-align says. A title that wraps does not: "Trusted By
   Millions" on the USP strip goes to two lines at 375px and drew a centred icon
   over two left-ragged lines.

   SCOPED TO top/bottom AND NOTHING ELSE. The default is 'right' and every tool
   stored today uses it, so this reaches nothing until a tool opts in.

   BOTH ARRANGEMENTS, not just 'bottom'. They are the same one mirrored and they
   already share the button rule below; covering one would leave the other as
   exactly the fault this removes.

   NOT align-items ON .etick-content__banner-body. That would shrink each block
   to its content and move the wrap points; text-align moves the glyphs and
   nothing else. The button is unaffected either way - it keeps its own
   align-self below. */
.etick-content[data-text-position='top'] .etick-content__banner-text,
.etick-content[data-text-position='bottom'] .etick-content__banner-text,
.etick-content[data-text-position='top'] .etick-content__banner-desc,
.etick-content[data-text-position='bottom'] .etick-content__banner-desc {
  text-align: center;
}

/* Centred writing puts the button under the middle of it, not hard left. */
.etick-content[data-text-position='top'] .etick-content__banner-cta,
.etick-content[data-text-position='bottom'] .etick-content__banner-cta {
  align-self: center;
}

/* CR-P125 T-A. The same courtesy for the grid, which asks the same question
   through a different setting. "Centre everything in each card" sets
   align-items on the body, and the button's own align-self would beat it - so a
   centred card would have had every line down the middle and the button hard
   left. Only the grid ever carries data-center, so this cannot reach Grid with
   title. */
.etick-content[data-center='1'] .etick-content__banner-cta {
  align-self: center;
}

/* CR-P125 T-A. When a grid card's button has taken the address off the card,
   the picture carries it too - two anchors side by side rather than one inside
   the other. This only has to stop the anchor behaving like a line of text; it
   is left UNPOSITIONED on purpose, so the badge goes on resolving its absolute
   corner against .etick-content__media-wrap exactly as it did. */
.etick-content__media-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

/* --- phones ------------------------------------------------------------
   Only the accordion needs a rule of its own: the others are already down to
   one or two across through --etick-per, which the block prints. Panels that
   share a 400px row on a desktop have to become a stack, because there is no
   width left to share. */

/* --- a grid that slides on a phone (CR-P129 T-B) -----------------------
   A plain swipe: native scrolling with snap points. No arrows, nothing moving
   on its own, and no JavaScript at all - the browser's own momentum and
   snapping, which is what the reference row does for a touch user.

   640px, NOT the 768px below, AND THE DIFFERENCE MATTERS. --etick-per steps
   down to the phone count in the block's OWN style block at max-width: 640px.
   Sliding at 768 would mean that between 640 and 768 the row slid while
   --etick-per still held the TABLET count, so the slide width and the number
   across would disagree. Same boundary as the Show all cap, for the same
   reason.

   IT STAYS display: grid. The row is already a grid, so switching to flex would
   change the layout model for the sake of one breakpoint; grid-auto-flow turns
   the same grid on its side. grid-template-columns has to be cleared or the
   base rule's repeat() still applies and nothing flows into a column.

   THE SLIDE WIDTH IS THE SAME ARITHMETIC THE COLUMNS USED - the row less the
   gaps between however many are shown - so "How many across on a phone" goes on
   meaning what it says, and one across gives a card the full width.

   ROW BY ROW (CR-P137 T-A) IS THE SAME STRIP, ONCE PER ROW. render.php wraps
   each row in .etick-content__slide-row and prints data-mobile-slide="rows"
   instead of "1", so the strip rules below reach the WRAPPERS rather than the
   outer row, which just stacks them. They share one rule each rather than
   carrying a copy, so the two kinds of sliding cannot drift apart. */
@media (max-width: 640px) {
  .etick-content[data-mobile-slide='1'] .etick-content__row,
  .etick-content[data-mobile-slide='rows'] .etick-content__slide-row {
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - (var(--etick-per) - 1) * var(--etick-gap)) / var(--etick-per));
    grid-template-columns: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    /* Firefox. The bar is noise on a touch strip; the scrolling itself must
       never be turned off, so overflow stays auto and only the bar is hidden. */
    scrollbar-width: none;
  }

  .etick-content[data-mobile-slide='1'] .etick-content__row::-webkit-scrollbar,
  .etick-content[data-mobile-slide='rows'] .etick-content__slide-row::-webkit-scrollbar {
    display: none;
  }

  .etick-content[data-mobile-slide='1'] .etick-content__row > *,
  .etick-content[data-mobile-slide='rows'] .etick-content__slide-row > * {
    scroll-snap-align: start;
  }

  /* The outer row stacks the rows: one column, the same gap between rows as
     between cards. minmax(0, 1fr) and not 1fr, so a strip wider than the screen
     scrolls inside its column instead of widening it. */
  .etick-content[data-mobile-slide='rows'] .etick-content__row {
    grid-template-columns: minmax(0, 1fr);
  }

  /* What the outer row has from the base rule, each strip needs of its own: it
     is display: contents everywhere else, so it has no grid and no gap until
     here. */
  .etick-content[data-mobile-slide='rows'] .etick-content__slide-row {
    display: grid;
    gap: var(--etick-gap);
  }

  /* CR-P168 T-A. Grid with title's strip keeps its 1rem padding, so an item's
     snap point would sit 1rem past the edge the padding leaves and the first
     item could never be the resting place. The same 1rem as scroll padding
     puts every item's resting place at the padded edge. */
  .etick-content[data-layout='banner'][data-mobile-slide='1'] .etick-content__row {
    scroll-padding-inline: 1rem;
  }
}

/* --- a grid that slides on a computer (CR-P143 T-B) --------------------
   The phone's strip above, from 641px up instead of below, for a grid that
   prints data-desktop-slide="1". --etick-per is the desktop count above 1024
   and the tablet count between, printed by the block, so each slide is as wide
   as a column would have been and "How many across" goes on meaning what it
   says. There is somewhere to go only once there are more items than that,
   which is Q-P143-1's answer: no separate number.

   A COPY OF THE PHONE'S DECLARATIONS, AND IT HAS TO BE. The two are the same
   strip under opposite media conditions, and a selector list cannot carry a
   width, so they cannot share one rule the way the CR-P137 rows share the
   CR-P129 one. If one changes, change the other.

   ROOM ABOVE AND BELOW THE STRIP. A scroll container clips in both
   directions, so the card's hover lift (-4px) and its shadow (0 16px 32px)
   would be cut off at the strip's edge. Padding gives them room and the same
   negative margin takes it back, so the row sits exactly where it did.

   THE ARROWS ARE THE CAROUSEL'S OWN (.etick-carousel__arrow in
   etick-carousel.css, which every content block loads), built by
   etick-content-block.js, so they wear the look and the focus ring every
   carousel on the site already has. Two rules here: one hides a single arrow
   the script has marked hidden, which the carousel never needed because it
   only hides the pair; the other keeps them off a phone, which is a swipe
   (Q-P129-1, Q-P129-2). */
@media (min-width: 641px) {
  /* The block contains its row's margins rather than letting them pass
     through it. Without this the negative margins below collapse through the
     block on some pages and not others, so the block's height - which the
     arrows are centred on - would include the shadow room on one page and not
     on the next. With it the block is exactly the cards, everywhere. */
  .etick-content[data-desktop-slide='1'] {
    display: flow-root;
  }

  .etick-content[data-desktop-slide='1'] .etick-content__row {
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - (var(--etick-per) - 1) * var(--etick-gap)) / var(--etick-per));
    grid-template-columns: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-top: 8px;
    padding-bottom: 32px;
    margin-top: -8px;
    margin-bottom: -32px;
  }

  .etick-content[data-desktop-slide='1'] .etick-content__row::-webkit-scrollbar {
    display: none;
  }

  /* Through the CR-P137 wrapper too: above 640px it is display: contents, so
     its cards are the strip's cards and need the snap point themselves. */
  .etick-content[data-desktop-slide='1'] .etick-content__row > *,
  .etick-content[data-desktop-slide='1'] .etick-content__slide-row > * {
    scroll-snap-align: start;
  }

  /* "Never show them" leaves a mouse with no trackpad no way along a row
     whose bar is hidden, so with no arrows the bar comes back, thin.

     A bar is drawn at the bottom of the strip's padding, so the shadow room
     above would put it 32px under the cards and OUTSIDE the block - on top of
     whatever the page puts next. Here the room shrinks to 16px and the block
     takes it for real (no negative margin), so the bar sits just under the
     cards and inside the block. The price, in this one mode, is that a boxed
     card's shadow may be trimmed at its lowest edge. */
  .etick-content[data-desktop-slide='1'][data-arrows='never'] .etick-content__row {
    scrollbar-width: thin;
    padding-bottom: 16px;
    margin-bottom: 0;
  }

  .etick-content[data-desktop-slide='1'][data-arrows='never'] .etick-content__row::-webkit-scrollbar {
    display: block;
    height: 6px;
  }

  .etick-content[data-desktop-slide='1'][data-arrows='never'] .etick-content__row::-webkit-scrollbar-thumb {
    border-radius: 3px;
    background: rgba(15, 23, 42, 0.25);
  }

  .etick-content[data-desktop-slide='1'] .etick-carousel__arrow[hidden] {
    display: none;
  }

  /* CR-P147 T-A. How high up the arrows sit. etick-content-block.js sets
     --etick-arrow-top on the arrows when a tool asks for the middle of the
     picture or of the writing; unset, it is the carousel's own 50% - the middle
     of the card, where they have always been. The carousel's translateY(-50%)
     keeps each button centred on that line. */
  .etick-content[data-desktop-slide='1'] > .etick-carousel__arrows .etick-carousel__arrow {
    top: var(--etick-arrow-top, 50%);
  }
}

@media (max-width: 640px) {
  .etick-content[data-desktop-slide='1'] > .etick-carousel__arrows {
    display: none;
  }
}

@media (max-width: 768px) {
  .etick-content[data-layout='accordion'] .etick-content__panels {
    flex-direction: column;
    height: auto;
  }

  .etick-content__panel {
    flex: none;
    height: 60px;
    transition: height 0.3s ease, filter 0.4s ease;
  }

  .etick-content__panel.is-open {
    height: 190px;
  }

  .etick-content__panel-name {
    top: 50%;
    left: 12px;
    max-width: 90%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    text-align: left;
  }

  .etick-content__panel-body {
    top: 60px;
    bottom: auto;
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
  }

  .etick-content__panel-title {
    margin-bottom: 0.2rem;
    font-size: 0.9rem;
  }

  .etick-content__panel-desc {
    font-size: 0.72rem;
  }

  .etick-content__image {
    height: 160px;
  }
}

/* Reduced motion: the flip, the panel and the card lift are decoration. The
   layouts still change, they just stop animating on the way. */
@media (prefers-reduced-motion: reduce) {
  .etick-content__card,
  .etick-content__panel,
  .etick-content__flip-inner {
    transition: none;
  }

  a.etick-content__card:hover {
    transform: none;
  }
}


/* =======================================================================
   PER-TOOL SETTINGS (CR-P070 T-A, Q-P070-14)
   =======================================================================
   Everything below is here so a setting on the Add Content form can be SEEN.
   The rule that keeps that honest: a setting exists only if a rule here (or the
   carousel script) reads it. The values arrive as custom properties and data
   attributes printed by render.php, already clamped to the schema in
   etick_cms_layout_settings() — nothing here has to defend itself, but every
   rule carries its own fallback so a block saved before settings existed looks
   exactly as it did.
   ======================================================================= */

/* --- arrows, on any carousel ------------------------------------------- */
/* The arrows are built by etick-carousel.js, so hiding them belongs here
   rather than in a change to a script shared with everything else. */
.etick-content[data-arrows='never'] .etick-carousel__arrows {
  display: none;
}

/* --- no box around each item (CR-P089 T-A) ------------------------------
   The card at line 59 paints a panel, a thin edge and a shadow. This takes all
   three away for a tool that asked for it, and NOTHING ELSE - the row, the
   pictures and the writing keep every measurement they had.

   TRANSPARENT RATHER THAN REMOVED, on both the edge and the panel. `border: 0`
   would give the card back the pixel of width the border holds on each side,
   pulling its contents in and changing the row's rhythm; a transparent border
   occupies exactly the room the visible one did. The radius is left alone on
   purpose: the card clips its picture with overflow:hidden, so removing it
   would square off every picture corner, which is not what "no box" asks for.

   The hover LIFT stays and only its shadow goes - the movement is the feedback
   that the card is a link, and that is not part of the box. The focus ring is
   untouched for the same reason. */
.etick-content[data-no-box='1'] .etick-content__card {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.etick-content[data-no-box='1'] a.etick-content__card:hover {
  box-shadow: none;
}

/* The flip card's two faces and the strip's little tile (CR-P089 T-B). Same
   tick, the other two boxes it can mean.

   ON A FLIP CARD IT WINS OVER Front colour AND Back colour, which is the
   precedence image_only set in CR-P080: the setting that takes a thing away
   beats the settings that decorate it. Nothing is removed from the form for it
   - the rule below simply outranks --etick-front-bg and --etick-back-bg on the
   face - and the tick's own hint says so on the screen.

   BACK WRITING COLOUR STILL APPLIES, drawn over whatever the page is rather
   than over the back face's own colour. That is the owner's setting to choose,
   so it is left alone here and measured before this lands instead. */
.etick-content[data-no-box='1'] .etick-content__flip-face {
  background: transparent;
  box-shadow: none;
}

/* The tile CR-P088 gave its pale orange back. This is the third answer to the
   question that left open: not white, not orange, but no tile at all for a row
   of logos that wants none. The picture inside keeps its 22px box, so nothing
   in the strip moves. */
.etick-content[data-no-box='1'] .etick-content__mark {
  background: transparent;
}

.etick-content[data-no-box='1'] .etick-content__mark.is-image {
  border-color: transparent;
  box-shadow: none;
}

/* --- the card look, ported from the offers block (CR-P091 T-A) ----------
   includes/blocks/promo/render.php is the source of truth for what these two
   looks are, and every rule below came out of it rather than off a screenshot.

   IT IS A SKIN OVER THE ONE CARD. parts.php still draws one card and this
   repaints it, so there is no second card markup to keep in step. The two
   pieces of structure the offers card adds - the fade over the bottom of the
   picture and the badge floating on it - are done here too: the badge already
   floats on the generic card, and the fade is an ::after on the picture, so it
   exists only where there IS a picture.

   WHAT IS NOT REPAINTED: the picture height. That is the tool's own Picture
   height setting, and a look that overrode it would leave a control that does
   nothing, which is the fault CR-P081 was raised for. The old offers card drew
   at 190px and the flat one at 158px; the setting's hint says so.

   ONLY EVER SELECTED IN THE PRESENT FORM. render.php prints the attribute only
   when it is not "plain", so nothing here can reach a tool that has not asked
   for it. */

/* MEASURED OFF eticketing.my, WHICH IS THE CARD THIS IS MEANT TO BE (Q-P091-7:
   "for offer card - make it similar to eticketing.my").

   THE BUG THIS FIXES, and it is the whole of the readability argument that ran
   through Q-P091-3 to Q-P091-6. The live card fades from white through two PALE
   tints - read off the page as #FFF7ED at 55% and #FFEDD5 at the end. The copy
   in includes/blocks/promo/render.php has those two stops written as
   var(--etick-accent), so locally the card fades from white into SOLID ORANGE.
   Everything drawn on it - the code, the View more, the More Info - is accent
   coloured, which is perfectly readable on cream and invisible on orange. The
   tints were lost when that file was tokenised; the colours on top were not
   wrong, the ground under them was.

   So the ground is put back and everything on it goes back to the original's
   own colours. The tints are MIXED FROM THE TOKENS rather than written as the
   two hex values, so a re-themed site gets the same pale relationship to its own
   accent instead of this palette's orange frozen in - the rule this CR sets for
   every colour it touches. At the shipped palette the mix lands within a shade
   of the live values. */
.etick-content[data-card-template='offers'] .etick-content__card {
  --etick-offers-tint: color-mix(in srgb, var(--etick-accent) 7%, var(--etick-background));
  --etick-offers-tint-strong: color-mix(in srgb, var(--etick-accent) 16%, var(--etick-background));
  --etick-offers-ink: color-mix(in srgb, var(--etick-accent) 45%, #000000);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 18px;
  background: linear-gradient(155deg, var(--etick-background) 0%, var(--etick-offers-tint) 55%, var(--etick-offers-tint-strong) 100%);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.12);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

/* The original lifts whether or not the card is a link - it is an <article>
   there - so this is not narrowed to a.etick-content__card the way the plain
   card's own hover is. */
.etick-content[data-card-template='offers'] .etick-content__card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
}

/* NO DARK BAND OVER THE PICTURE. The local promo/render.php styles a
   .promo-image-fade, but on eticketing.my that element computes to no background
   at all - the live card simply does not have it, and this is meant to look like
   the live card (Q-P091-7). The wrapper keeps position and overflow so the
   hover zoom below still stays inside the corners. */
.etick-content[data-card-template='offers'] .etick-content__media {
  position: relative;
  overflow: hidden;
}

.etick-content[data-card-template='offers'] .etick-content__image {
  transition: transform 0.5s ease;
}

.etick-content[data-card-template='offers'] .etick-content__card:hover .etick-content__image {
  transform: scale(1.06);
}

/* The badge keeps the accent background and the accent's own contrast colour it
   already had - the original hard-coded #fff, and taking that literally would
   put the old white back on a site that has been re-themed. Only its size, its
   spacing and its shadow are the offers card's. */
.etick-content[data-card-template='offers'] .etick-content__badge {
  padding: 0.3rem 0.55rem;
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--etick-accent) 35%, transparent);
}

.etick-content[data-card-template='offers'] .etick-content__body {
  align-items: center;
  padding: 1rem 1rem 1.1rem;
  text-align: center;
}

/* The min-height is what keeps a row of cards level when one title runs to two
   lines and the next does not. */
.etick-content[data-card-template='offers'] .etick-content__title {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  min-height: 2.8em;
  color: var(--etick-primary);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.32;
}

/* The code is one dashed pill in the original, not a pill beside a button, so
   the row becomes the pill and the value inside it gives up its own. */
/* The pill as eticketing.my draws it: the pale tint behind, a dashed accent
   edge, and dark warm writing on it. Once the card's ground is cream again these
   are simply the original's own values - there is nothing to work around. */
.etick-content[data-card-template='offers'] .etick-content__code {
  align-self: center;
  align-items: center;
  gap: 0.4rem;
  border: 1px dashed var(--etick-accent);
  border-radius: 999px;
  background: var(--etick-offers-tint);
  padding: 0.32rem 0.62rem;
  color: var(--etick-offers-ink);
  font-size: 0.77rem;
  font-weight: 600;
}

.etick-content[data-card-template='offers'] .etick-content__code-value {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: 0;
}

.etick-content[data-card-template='offers'] .etick-content__code-copy {
  background: transparent;
  padding: 0;
  color: var(--etick-offers-ink);
  font-size: 0.77rem;
  transition: transform 0.2s ease, color 0.2s ease;
}

.etick-content[data-card-template='offers'] .etick-content__code-copy:hover {
  background: transparent;
  transform: scale(1.08);
}

/* The copied state has to survive the two rules above, which are more specific
   than .is-copied on its own. Green as the word rather than behind it, because
   there is no longer a filled pill to turn green. */
.etick-content[data-card-template='offers'] .etick-content__code-copy.is-copied {
  background: transparent;
  color: #16a34a;
}

/* BACK TO THE ORIGINAL'S ACCENT, which is what eticketing.my uses and which
   reads perfectly now the card behind it is cream rather than orange. It was
   dark for two rounds only because the ground was wrong; fixing the ground fixed
   the reason. */
/* A CHEVRON INSTEAD OF AN UNDERLINE (Q-P091-5), which is what the original
   does: promo/render.php draws a 16px SVG caret beside the words and turns it
   over when the writing opens.

   DRAWN IN CSS, AND ONLY FOR THESE TWO LOOKS. The View more belongs to every
   layout that can carry a card body, and this CR's standing rule is that a tool
   nobody re-saves renders byte for byte as it did - so putting the caret in
   parts.php would have changed the markup of every existing tool. Two borders
   on an ::after cost no markup at all, so nothing outside these two looks can
   see it.

   It turns over on .is-open, which the script already puts on the button - the
   same class the words are swapped by, so the caret and the label cannot
   disagree. currentColor means it follows whatever colour the button is. */
.etick-content[data-card-template='offers'] .etick-content__desc-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  align-self: center;
  margin-top: 0.85rem;
  color: var(--etick-accent);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.etick-content[data-card-template='offers'] .etick-content__desc-toggle::after {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.3s ease;
}

.etick-content[data-card-template='offers'] .etick-content__desc-toggle.is-open::after {
  margin-top: 2px;
  transform: rotate(-135deg);
}

.etick-content[data-card-template='offers'] .etick-content__desc {
  color: var(--etick-primary-second);
  font-size: 0.93rem;
  line-height: 1.55;
  text-align: center;
}

/* --- the same card, flat (design2 in the offers block) ------------------ */

.etick-content[data-card-template='offers2'] .etick-content__card {
  overflow: hidden;
  border: 1px solid var(--etick-additional);
  border-radius: 6px;
  background: var(--etick-background);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

/* Flat means flat: no lift, only a slightly deeper shadow. */
.etick-content[data-card-template='offers2'] .etick-content__card:hover {
  transform: none;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
}

.etick-content[data-card-template='offers2'] .etick-content__badge {
  top: 14px;
  left: 14px;
  box-shadow: none;
  padding: 0.38rem 0.65rem;
  font-size: 0.65rem;
  letter-spacing: 0;
}

/* THE VIEW MORE SITS BESIDE THE TITLE (Q-P091-4), which is what the original
   does: promo/render.php turns .promo-title-row into a real flex row on the
   flat card, with the heading on the left and the toggle hard right.

   DONE AS A GRID RATHER THAN BY REORDERING THE MARKUP, because parts.php draws
   the one card every layout shares - moving the button there would move it for
   the accordion, the grid and the plain carousel too. Two columns: the writing
   takes the first, the toggle the second, and everything after them spans both.
   The markup order is untouched, so a screen reader still meets the heading,
   then the control, then what the control reveals. */
.etick-content[data-card-template='offers2'] .etick-content__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: start;
  align-items: start;
  gap: 0.4rem 0.85rem;
  padding: 1.35rem 1.25rem 1.25rem;
  text-align: left;
}

.etick-content[data-card-template='offers2'] .etick-content__title {
  grid-column: 1;
  grid-row: 1;
}

.etick-content[data-card-template='offers2'] .etick-content__desc-toggle {
  grid-column: 2;
  grid-row: 1;
}

/* Everything below the heading row runs the whole width. NOTE these set
   placement only - never `display` - because .etick-content__desc is revealed by
   clearing `hidden`, and an author display would beat it. */
.etick-content[data-card-template='offers2'] .etick-content__subtitle,
.etick-content[data-card-template='offers2'] .etick-content__code,
.etick-content[data-card-template='offers2'] .etick-content__desc {
  grid-column: 1 / -1;
}

.etick-content[data-card-template='offers2'] .etick-content__title {
  color: var(--etick-primary-second);
  font-size: 1.08rem;
  font-weight: 800;
}

/* A filled panel with the code on the left and the button on the right. */
/* THE PANEL BEHIND THE CODE, LANDED ON THE THIRD TRY (Q-P091-5, Q-P091-6).
   The original's --etick-background-secondary is #F8FAFC here, which the owner
   called too close to white; --etick-additional (#E5E7EB) was then called too
   grey. This is the half-way point between them, and it is mixed FROM the two
   tokens rather than written as a hex, so a re-themed site gets the same
   relationship instead of this palette's answer frozen in. */
.etick-content[data-card-template='offers2'] .etick-content__code {
  flex-wrap: nowrap;
  align-items: center;
  border-radius: 4px;
  background: color-mix(in srgb, var(--etick-additional) 50%, var(--etick-background));
  padding: 0.72rem 0.82rem;
}

.etick-content[data-card-template='offers2'] .etick-content__code-value {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  color: var(--etick-accent);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0;
}

/* The little grey line above the code. It is written in the stylesheet because
   that is where the original writes it too - promo/render.php prints the same
   ::before - and moving it into the markup would be a change to the one card
   every layout draws, for the sake of one look. */
.etick-content[data-card-template='offers2'] .etick-content__code-value::before {
  content: 'USE CODE';
  display: block;
  color: var(--etick-secondary);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.etick-content[data-card-template='offers2'] .etick-content__code-copy {
  flex: 0 0 auto;
  min-width: 52px;
  border-radius: 2px;
  padding: 0.42rem 0.9rem;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
}

/* THE COPY BUTTON DOES NOT CHANGE COLOUR ON THE FLAT CARD (Q-P091-4: "clicking
   copy should not change color, just the text for a while"). The script already
   swaps the word to Copied! and back after a moment and moves the accessible
   name with it; this simply holds the button's own colours still while it does,
   overriding the green the shared rule would otherwise give it. */
.etick-content[data-card-template='offers2'] .etick-content__code-copy.is-copied {
  background: var(--etick-accent);
  color: var(--etick-accent-contrast);
}

/* Hard right, and level with the FIRST line of the heading - which is what the
   original does (align-items: flex-start with a 0.1rem nudge). It was
   align-self: flex-end before the body became a grid, and in a grid that means
   the bottom of the row: with a title long enough to wrap, the control sank 26px
   below the line it is meant to sit beside. Measured at 375px, where the titles
   wrap first. */
/* The same caret, at the smaller size the flat card's original uses (12px
   against 16px), and with the underline off here too. */
.etick-content[data-card-template='offers2'] .etick-content__desc-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  align-self: start;
  justify-self: end;
  margin-top: 0.1rem;
  color: var(--etick-accent);
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.etick-content[data-card-template='offers2'] .etick-content__desc-toggle::after {
  content: '';
  display: block;
  width: 5px;
  height: 5px;
  margin-top: -3px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.3s ease;
}

.etick-content[data-card-template='offers2'] .etick-content__desc-toggle.is-open::after {
  margin-top: 2px;
  transform: rotate(-135deg);
}

.etick-content[data-card-template='offers2'] .etick-content__desc {
  color: var(--etick-secondary);
  text-align: left;
}

/* --- the More Info button inside the revealed writing (Q-P091-4) --------
   The original puts the description and a More Info button together in the part
   the View more opens, on both looks. parts.php draws the button inside the
   description paragraph, because that paragraph is the thing the script
   reveals - see the note there.

   EACH ONE IS display: block SO IT TAKES ITS OWN LINE. It must not be done by
   giving the paragraph a flex column: `display` on .etick-content__desc beats
   `hidden` and would leave the writing showing under a closed View more. */

/* The accent button eticketing.my draws, white writing and all - inverted for
   two rounds only because the card behind it was orange. With the ground back to
   cream this is the original again, value for value. */
.etick-content[data-card-template='offers'] .etick-content__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: fit-content;
  margin: 0.95rem auto 0;
  border-radius: 999px;
  background: var(--etick-accent);
  padding: 0.52rem 0.85rem;
  color: var(--etick-accent-contrast);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--etick-accent) 26%, transparent);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.etick-content[data-card-template='offers'] .etick-content__cta:hover {
  transform: translateY(-1px);
  filter: brightness(0.95);
}

/* On the flat card it runs the full width, the way the original's does. */
.etick-content[data-card-template='offers2'] .etick-content__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  margin-top: 1rem;
  border-radius: 4px;
  background: var(--etick-accent);
  padding: 0.72rem 1rem;
  color: var(--etick-accent-contrast);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 8px 16px color-mix(in srgb, var(--etick-accent) 20%, transparent);
}

.etick-content[data-card-template='offers2'] .etick-content__cta:hover {
  background: var(--etick-accent-second);
  color: var(--etick-accent-contrast);
}

/* The flat card reveals its writing in a panel that bleeds to the card's edges,
   under a hairline - copied from the original's opened .promo-content. The
   negative margins are the body's own padding, so the panel meets the card. */
.etick-content[data-card-template='offers2'] .etick-content__desc {
  margin: 1.1rem -1.25rem -1.25rem;
  border-top: 1px solid var(--etick-additional);
  background: var(--etick-background-secondary);
  padding: 1rem 1.25rem 1.25rem;
}

/* The size the original gives it - 14 by 10, which is its viewBox. */
.etick-content__cta-arrow {
  flex: 0 0 auto;
  width: 14px;
  height: 10px;
}

.etick-content[data-card-template='offers'] .etick-content__cta:focus-visible,
.etick-content[data-card-template='offers2'] .etick-content__cta:focus-visible {
  outline: 2px solid var(--etick-primary-second);
  outline-offset: 2px;
}

/* --- opening ONE card must not grow the others (Q-P091-8) ---------------
   The reported fault was that pressing View more on one card expanded every
   card. The STATE was never shared - measured, exactly one description opens
   and exactly one button reports itself expanded. What was shared was the
   HEIGHT: .etick-carousel__list is a flex row and its slides stretch to the
   tallest by default, so the card that grew dragged all fifteen others up with
   it, leaving them tall and empty. Measured on the page: every card 313px
   before the press and 416px after, opened or not.

   ALIGNING TO THE TOP is what lets one card grow alone.

   SCOPED WITH :has() SO NOTHING ELSE MOVES. Only a carousel that actually
   carries a View more can have a card change height on a press, so only those
   give up the stretch; a carousel without one keeps its slides exactly as they
   are, and no markup changes to say so.

   It is written here rather than in etick-carousel.css because the reason lives
   in this file: the carousel has no opinion about card bodies. */
.etick-carousel__list:has(.etick-content__desc-toggle) {
  align-items: flex-start;
}

/* --- the offers card's Copy mark (Q-P091-8) -----------------------------
   Both marks are always in the markup; this shows one at a time. The check
   takes over on .is-copied, which the script already sets and clears, so the
   confirmation needs nothing of its own. */
.etick-content__code-copy-icon,
.etick-content__code-copy-done {
  display: block;
  width: 15px;
  height: 15px;
}

.etick-content__code-copy-done,
.etick-content__code-copy.is-copied .etick-content__code-copy-icon {
  display: none;
}

.etick-content__code-copy.is-copied .etick-content__code-copy-done {
  display: block;
  color: #16a34a;
}

/* The icon form is a bare mark, so it gives up the pill the word form wears. */
.etick-content[data-card-template='offers'] .etick-content__code-copy {
  display: flex;
  align-items: center;
  border-radius: 0;
  line-height: 1;
}

/* --- the popular trip card (CR-P091 T-B) --------------------------------
   MEASURED OFF THE LIVE BLOCK on eticketing.my, the same way T-A's was, because
   includes/blocks/topdes/render.php is Tailwind classes rather than values and
   the live page is where they resolve: a 12px radius, the shadow-md pair, the
   picture covering and centred, and an overlay that is transparent at the
   bottom, 60% black across the middle and transparent again at the top.

   THIS CARD IS A DIFFERENT SHAPE, NOT A SKIN, and it is still no new markup.
   The picture stops being a panel at the top and becomes the whole card, with
   the writing over it - done by taking the picture's wrapper out of the flow and
   letting the body sit above it. parts.php draws exactly what it always drew.

   WHICH ALSO KEEPS "How the picture fills its space" WORKING. The picture is
   still an <img>, so object-fit reads the setting straight off --etick-image-fit
   and there is nothing to map. The accordion has to translate that setting onto
   background-size because it paints its picture as a background; this does not,
   and is the better for it.

   PICTURE HEIGHT BECOMES THE CARD'S HEIGHT here, since the picture IS the card.
   A minimum rather than a fixed height, so a long route or a second line cannot
   be clipped. */

.etick-content[data-card-template='trip'] .etick-content__card {
  position: relative;
  justify-content: center;
  overflow: hidden;
  min-height: var(--etick-image-h, 180px);
  border: 0;
  border-radius: 12px;
  background: transparent;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.28s ease;
}

/* The live card deepens its shadow on hover and does not lift. */
.etick-content[data-card-template='trip'] .etick-content__card:hover {
  transform: none;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.etick-content[data-card-template='trip'] .etick-content__media-wrap,
.etick-content[data-card-template='trip'] .etick-content__media {
  position: absolute;
  inset: 0;
}

.etick-content[data-card-template='trip'] .etick-content__image {
  width: 100%;
  height: 100%;
  object-fit: var(--etick-image-fit, cover);
  object-position: center;
}

/* The dark band the writing is read against, copied from the live overlay. It
   is on the wrapper, which parts.php always prints, so a card whose item has no
   picture still gets the band and its writing is still legible. */
.etick-content[data-card-template='trip'] .etick-content__media-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6) 50%, rgba(0, 0, 0, 0));
  pointer-events: none;
}

/* A card with no picture would otherwise show nothing behind the writing. */
.etick-content[data-card-template='trip'] .etick-content__media-wrap {
  background: #334155;
}

.etick-content[data-card-template='trip'] .etick-content__body {
  position: relative;
  z-index: 1;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.25rem;
  text-align: center;
}

/* The route, then the price - which is exactly what the item's title and second
   line hold, because content-preset.php already writes them that way. */
/* CR-P107 T-A: this wins over the base rule on specificity, so it reads the
   same variable or the Title size setting would silently do nothing on the one
   other card look the grid offers. Its own 1.09rem stays the fallback. */
/* CR-P133 T-A: THE WEIGHT IS THE SAME STORY AS THE SIZE ABOVE AND WAS THE WHOLE
   RISK OF THAT TASK. This rule set a flat 700, so a Title weight setting that
   touched only the base rule would have been a control that does nothing here -
   the exact fault CR-P095 exists to remove, and the one CR-P107 caught for the
   size. It reads the same variable now, with ITS OWN 700 as the fallback, so an
   untouched trip card is unmoved and a tool that picks a weight gets it on
   either look.

   ONE WART COMES WITH THAT AND IS DELIBERATELY NOT FIXED. render.php prints the
   variable only when the setting differs from the schema default of 800, so a
   trip-look tool that explicitly chooses Extra bold prints nothing and keeps
   this 700. Title size has behaved that way since CR-P107 for the same reason.
   The fix would be to print the variable always, which would change the markup
   of every grid on the site - a worse trade than the wart. */
.etick-content[data-card-template='trip'] .etick-content__title {
  color: #ffffff;
  font-size: var(--etick-title-size, 1.09rem);
  font-weight: var(--etick-title-weight, 700);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

.etick-content[data-card-template='trip'] .etick-content__subtitle {
  color: #ffffff;
  font-size: 1.125rem;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

.etick-content[data-card-template='trip'] .etick-content__desc {
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

/* The badge keeps its corner, above the picture and the band. */
.etick-content[data-card-template='trip'] .etick-content__badge {
  z-index: 2;
}

/* PICTURE SHAPE HAS NOTHING TO SAY ON THIS LOOK, and it has to be said at a
   weight that wins: the grid cuts its pictures to a shape through
   [data-image-shape], those rules sit lower in this file, and on equal
   specificity the later one takes it. Here the picture is cut to the CARD, so
   the ratio and the auto height are both overridden and the setting's own hint
   says it does nothing here. */
.etick-content[data-layout='grid'][data-card-template='trip'] .etick-content__image {
  height: 100%;
  aspect-ratio: auto;
}

/* No box takes the shadow and the corner away here, the same as everywhere. */
.etick-content[data-no-box='1'][data-card-template='trip'] .etick-content__card {
  box-shadow: none;
}

/* CR-P125 T-A. The grid's button may be turned on with the popular trip look,
   and the two do NOT fight - they only need this one line to agree. That card's
   body centres everything it holds, and the button's own align-self would have
   beaten it and pinned the button hard left under centred writing. Same fix and
   same reason as the data-center rule further up; the button is otherwise drawn
   exactly as it is on the ordinary card, sitting over the picture with the rest
   of the writing. */
.etick-content[data-card-template='trip'] .etick-content__banner-cta {
  align-self: center;
}

/* --- the trip card's hover panel (CR-P099 T-C) ---------------------------
   READ OFF THE ORIGINAL'S TAILWIND, class by class, the same way the card above
   was: p-8 is 2rem, bg-black bg-opacity-40 is rgba(0,0,0,0.4), duration-300 is
   0.3s, and the trail is h-6 with gap-2, 1rem down and pushed right by ml-auto.
   The three chevrons are 12px squares with two 2px white edges turned 315deg,
   sliding 6px either side of centre on a 1.5s loop, 0.2s apart — which is the
   original keyframe unchanged.

   CR-P091 T-B LEFT THE RESTING WRITING IN PLACE ON HOVER because there was
   nothing to swap in, and fading it out would have left a blank card. The panel
   is that something, so the swap is finally what the original did.

   NOTHING OUTSIDE THE TRIP LOOK CAN SEE ANY OF THIS — every rule is behind
   [data-card-template='trip'], and the panel is not even printed for another
   look. The fade on the body is scoped the same way, so no other card's writing
   gained a transition.

   FOCUS COUNTS AS WELL AS HOVER. The original was hover-only, so somebody
   moving through a page by keyboard could never reach the two codes. The card is
   already a link, so :focus-within costs nothing and shows the same panel on the
   same card. Whether a TOUCH screen should get it too is the owner's to settle
   and not one to answer quietly — it is asked as Q-P099-5, and until it is
   answered a phone behaves exactly as the original did. */

.etick-content[data-card-template='trip'] .etick-content__body {
  transition: opacity 0.3s ease;
}

.etick-content[data-card-template='trip'] .etick-content__card:hover .etick-content__body,
.etick-content[data-card-template='trip'] .etick-content__card:focus-within .etick-content__body {
  opacity: 0;
}

.etick-content[data-card-template='trip'] .etick-content__trip-panel {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.etick-content[data-card-template='trip'] .etick-content__card:hover .etick-content__trip-panel,
.etick-content[data-card-template='trip'] .etick-content__card:focus-within .etick-content__trip-panel {
  opacity: 1;
}

.etick-content[data-card-template='trip'] .etick-content__trip-route {
  display: flex;
  flex-direction: column;
}

/* text-sm for the two terminals and text-base for the word between them — the
   original's own three sizes, all of them font-bold. */
.etick-content[data-card-template='trip'] .etick-content__trip-end {
  font-size: 0.875rem;
  font-weight: 700;
}

.etick-content[data-card-template='trip'] .etick-content__trip-word {
  font-size: 1rem;
  font-weight: 700;
}

.etick-content[data-card-template='trip'] .etick-content__trip-arrows {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 1.5rem;
  margin-top: 1rem;
  margin-left: auto;
}

.etick-content[data-card-template='trip'] .etick-content__trip-arrows span {
  display: block;
  width: 12px;
  height: 12px;
  border-bottom: 2px solid #ffffff;
  border-right: 2px solid #ffffff;
  transform: rotate(315deg);
  animation: etickTripArrow 1.5s infinite;
}

.etick-content[data-card-template='trip'] .etick-content__trip-arrows span:nth-child(2) {
  animation-delay: 0.2s;
}

.etick-content[data-card-template='trip'] .etick-content__trip-arrows span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes etickTripArrow {
  0% {
    opacity: 0;
    transform: rotate(315deg) translateX(-6px);
  }
  50% {
    opacity: 1;
    transform: rotate(315deg) translateX(0);
  }
  100% {
    opacity: 0;
    transform: rotate(315deg) translateX(6px);
  }
}

/* The same bargain the rest of this file already strikes: the panel still
   appears and still says what it says, it just stops fading and the chevrons
   stop sliding. They are decoration and carry nothing a reader needs. */
@media (prefers-reduced-motion: reduce) {
  .etick-content[data-card-template='trip'] .etick-content__body,
  .etick-content[data-card-template='trip'] .etick-content__trip-panel {
    transition: none;
  }

  .etick-content[data-card-template='trip'] .etick-content__trip-arrows span {
    animation: none;
    opacity: 1;
  }
}

/* --- opening ONE card must not grow the others, in a GRID too --------------
   The other half of the fault fixed for carousels in Q-P091-8. A grid row makes
   its cards equal height the same way a carousel track does, so opening one
   card's writing stretched every card beside it. Same fix, same scoping: only a
   grid that actually carries a View more gives up the stretch, so no grid
   without one moves a pixel.

   CR-P137 T-A: on a phone, a grid sliding row by row has its cards in a strip
   of their own, and it is that strip doing the stretching - so it gives it up
   too. Everywhere else the strip is display: contents and the line is inert. */
.etick-content[data-layout='grid'] .etick-content__row:has(.etick-content__desc-toggle),
.etick-content[data-layout='grid'] .etick-content__row:has(.etick-content__desc-toggle) .etick-content__slide-row {
  align-items: start;
}

/* --- no box wins over the card look ------------------------------------
   The precedence CR-P080 T-D set and CR-P089 T-B kept: the setting that TAKES A
   THING AWAY beats the settings that decorate it. Written out at its own
   specificity rather than left to the order rules happen to sit in this file,
   so moving a block around later cannot silently reverse it.

   "Show only the picture" needs no rule of its own: it returns a card with no
   body at all, so every body rule above has nothing to match. The card's own
   shape is still the look's, which is right - that tick takes the writing away,
   not the card. */
.etick-content[data-no-box='1'][data-card-template] .etick-content__card {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.etick-content[data-no-box='1'][data-card-template] .etick-content__card:hover {
  transform: none;
  box-shadow: none;
}

/* --- grid: the shape every picture is cut to ---------------------------
   "Type of grid" comes down to this. With a set height the picture keeps the
   height it is given; with a ratio the width decides the height instead, so a
   row stays even however tall the pictures are. */
.etick-content[data-image-shape='square'] .etick-content__image,
.etick-content[data-image-shape='wide'] .etick-content__image,
.etick-content[data-image-shape='photo'] .etick-content__image,
.etick-content[data-image-shape='extrawide'] .etick-content__image,
.etick-content[data-image-shape='tall'] .etick-content__image {
  height: auto;
}

.etick-content[data-image-shape='square'] .etick-content__image { aspect-ratio: 1 / 1; }
.etick-content[data-image-shape='wide'] .etick-content__image { aspect-ratio: 16 / 9; }
/* CR-P133 T-B. 3:2 - the shape that gives a promo picture 62% of its card,
   which is what the card being copied gives its own. It belongs in the group
   above as much as it belongs here: the height:auto is what lets the ratio
   decide AND what beats the flat 160px the phone rule pins onto
   .etick-content__image, so leaving it out of the group would give a shape that
   works on a desktop and is ignored on a phone. */
.etick-content[data-image-shape='photo'] .etick-content__image { aspect-ratio: 3 / 2; }
/* CR-P125 T-B. A promo picture's own shape - the widest of the five, and the
   one an offers row needs. Note the group above: BOTH halves are needed, because
   the height:auto is what lets the ratio decide, and it is also what beats the
   flat 160px the phone rule pins onto .etick-content__image. That pin is one
   class and this is two, so a shaped picture overrides it whatever the media
   query order - which is how this shape is right on a phone as well. */
.etick-content[data-image-shape='extrawide'] .etick-content__image { aspect-ratio: 2 / 1; }
.etick-content[data-image-shape='tall'] .etick-content__image { aspect-ratio: 3 / 4; }

/* --- accordion: where the closed panel's name sits ----------------------
   The name is absolutely positioned and turned on its side, so align-items on
   the panel does nothing to it — its `top` is the only thing that moves it. The
   95px keeps the whole of it inside the panel at either end, because rotated it
   is as tall as its own max-width (150px) and it is centred on its own `top`. */
.etick-content[data-layout='accordion'][data-title-position='top'] .etick-content__panel-name {
  top: 95px;
}

.etick-content[data-layout='accordion'][data-title-position='center'] .etick-content__panel-name {
  top: 50%;
}

.etick-content[data-layout='accordion'][data-title-position='bottom'] .etick-content__panel-name {
  top: calc(100% - 95px);
}

/* --- grid with title: which side the writing goes ----------------------- */
.etick-content[data-text-position='left'] .etick-content__banner-item { flex-direction: row-reverse; }
.etick-content[data-text-position='right'] .etick-content__banner-item { flex-direction: row; }
.etick-content[data-text-position='top'] .etick-content__banner-item { flex-direction: column-reverse; }
.etick-content[data-text-position='bottom'] .etick-content__banner-item { flex-direction: column; }

/* --- the full-width picture slider --------------------------------------
   The picture IS the slide. --etick-per is 1 at every width (the shape says
   so), so one picture fills the row and the carousel script does the rest. */
.etick-content[data-layout='imageslider'] .etick-content__full {
  display: block;
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  text-decoration: none;
}

.etick-content[data-layout='imageslider'] .etick-content__full-image,
.etick-content[data-layout='imageslider'] .etick-content__full-empty {
  display: block;
  width: 100%;
  height: var(--etick-image-h, 420px);
  object-fit: var(--etick-image-fit, cover);
  background: var(--etick-additional);
}

/* Over the picture rather than under it, so the picture keeps the whole height
   it was given. */
.etick-content[data-layout='imageslider'] .etick-content__full-caption {
  display: block;
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 2.5rem 1.25rem 1rem;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0));
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
}

/* --- how the picture fills its space, where it is a BACKGROUND -----------
   The accordion paints its picture with background-image, which object-fit
   cannot touch, so the same four choices are mapped onto background-size here.
   "Stretch it to fit exactly" is 100% 100%, and "never bigger than it really
   is" is what contain does once the picture is smaller than its panel. Without
   the attribute nothing changes: the rule at line 172 still says cover. */
.etick-content[data-layout='accordion'][data-image-fit='cover'] .etick-content__panel { background-size: cover; }
/* background-position: top for the two that leave space, so the panel matches
   what the ordinary picture does under the same setting (CR-P113 T-A, Q-P113-3).
   The other two fill the panel and have nothing to position. */
.etick-content[data-layout='accordion'][data-image-fit='contain'] .etick-content__panel { background-size: contain; background-repeat: no-repeat; background-position: top; }
.etick-content[data-layout='accordion'][data-image-fit='fill'] .etick-content__panel { background-size: 100% 100%; }
.etick-content[data-layout='accordion'][data-image-fit='scale-down'] .etick-content__panel { background-size: contain; background-repeat: no-repeat; background-position: top; }

/* The strip's little mark is an <img> in a fixed square, so it takes the same
   choice the ordinary way. */
.etick-content[data-layout='banner'] .etick-content__mark-img {
  object-fit: var(--etick-image-fit, contain);
}
