/* 209: one offer identity per restaurant, with an independently readable pair.
   Prices share the card ink. There is no independent price background. */
@layer kalvass-contrast-207 {
  .tk-gastro-menu.tkg-color-system-25 .tk-gastro-item.tkg-offer-item {
    border-color:var(--tkg-offer-accent)!important;
  }
  .tk-gastro-menu.tkg-color-system-25 .tk-gastro-item.tkg-offer-item .tkg-offer-marker,
  .tk-gastro-menu.tkg-color-system-25 .tkg-offer-section-badge {
    --kg207-ink:var(--tkg-offer-on-accent);
    background:var(--tkg-offer-accent)!important;
    color:var(--tkg-offer-on-accent)!important;
    -webkit-text-fill-color:var(--tkg-offer-on-accent)!important;
    border-color:var(--tkg-offer-accent)!important;
  }
  .tk-gastro-menu.tkg-color-system-25 .tkg-offer-section {
    --kg207-ink:var(--tkg-offer-surface-ink);
    background:var(--tkg-offer-surface)!important;
    color:var(--tkg-offer-surface-ink)!important;
    border-color:var(--tkg-offer-accent)!important;
  }
  .tk-gastro-menu.tkg-color-system-25 .tkg-offer-section > h3,
  .tk-gastro-menu.tkg-color-system-25 .tkg-offer-section > h3 .tk-gastro-category-title {
    color:var(--tkg-offer-surface-ink)!important;
    -webkit-text-fill-color:var(--tkg-offer-surface-ink)!important;
  }
  .tk-gastro-menu.tkg-color-system-25 .tkg-offer-item .tkg-offer-price,
  .tk-gastro-menu.tkg-color-system-25 .tkg-offer-item .tkg-offer-price-line,
  .tk-gastro-menu.tkg-color-system-25 .tkg-offer-item .tkg-offer-price .tk-gastro-offer-old,
  .tk-gastro-menu.tkg-color-system-25 .tkg-offer-item .tkg-offer-price .tkg-offer-current {
    --kg207-ink:var(--tkg-offer-price-ink);
    color:var(--tkg-offer-price-ink)!important;
    -webkit-text-fill-color:var(--tkg-offer-price-ink)!important;
    background:transparent!important;opacity:1!important;text-shadow:none!important;
  }
  .tk-gastro-menu.tkg-color-system-25 .tkg-offer-item .tkg-offer-price .tkg-offer-saving {
    color:var(--tkg-offer-accent)!important;
    -webkit-text-fill-color:var(--tkg-offer-accent)!important;
    background:transparent!important;opacity:1!important;
  }
}
/* An important layout layer outranks legacy unlayered offer grids without
   touching normal dishes, selected quantities, hidden notes or order handlers. */
@layer kalvass-offer-layout-209 {
  .tk-gastro-menu .tkg-offer-item {border-width:1px!important;}
  .tk-gastro-menu .tkg-offer-marker {
    display:inline-flex!important;align-items:center!important;width:fit-content!important;
    max-width:100%!important;margin:0 0 10px!important;padding:5px 8px!important;
    border-radius:5px!important;font-size:11px!important;line-height:1.4!important;
    font-weight:750!important;letter-spacing:.045em!important;overflow-wrap:anywhere!important;
  }
  .tk-gastro-menu .tkg-offer-section {
    border:1px solid!important;border-left-width:4px!important;border-radius:14px!important;
    padding:14px 12px!important;margin-top:18px!important;margin-bottom:18px!important;
  }
  .tk-gastro-menu .tkg-offer-section > h3 {flex-wrap:wrap!important;gap:10px!important;margin-top:0!important;}
  .tk-gastro-menu .tkg-offer-section-badge {
    display:inline-flex!important;align-items:center!important;flex:0 0 auto!important;
    padding:4px 7px!important;border-radius:5px!important;font-size:11px!important;
    line-height:1.4!important;letter-spacing:.045em!important;font-weight:750!important;
  }
}

/* 226: Both server-rendered offers and the optional enhanced price pair use
   distinct grid cells. Keep this in the existing important layout layer:
   unlayered !important patches cannot override that layer. Normal variants
   are deliberately excluded. No price values or order handlers are changed. */
@layer kalvass-offer-layout-209 {
  .tk-gastro-menu .tk-gastro-variant:has(> .tk-gastro-offer-badge),
  .tk-gastro-menu .tk-gastro-variant.tkg-offer-variant {
    --tkg-offer-line:1;
    --tkg-offer-caption-line:2;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) max-content max-content max-content!important;
    grid-template-areas:none!important;grid-template-rows:none!important;
    grid-auto-flow:row!important;grid-auto-rows:auto!important;
    align-items:center!important;justify-items:end!important;
    gap:8px!important;width:100%!important;min-width:0!important;
    height:auto!important;min-height:0!important;box-sizing:border-box!important;
  }
  .tk-gastro-menu .tk-gastro-variant:has(> .tk-gastro-offer-badge) > :is(span,strong,.tk-gastro-order-action,.tk-gastro-inline-note),
  .tk-gastro-menu .tk-gastro-variant.tkg-offer-variant > :is(span,strong,.tk-gastro-order-action,.tk-gastro-inline-note) {
    position:static!important;inset:auto!important;transform:none!important;
    grid-area:auto!important;min-width:0!important;max-width:100%!important;
    width:auto!important;margin:0!important;box-sizing:border-box!important;
    text-decoration:none!important;
  }
  .tk-gastro-menu .tk-gastro-variant:has(> .tk-gastro-offer-badge) > span:not(.tk-gastro-offer-old):not(.tk-gastro-offer-badge):not(.tkg-offer-price),
  .tk-gastro-menu .tk-gastro-variant.tkg-offer-variant > span:not(.tk-gastro-offer-badge):not(.tkg-offer-price) {
    grid-column:1!important;grid-row:1!important;justify-self:start!important;
    white-space:normal!important;overflow-wrap:anywhere!important;text-align:left!important;
  }
  .tk-gastro-menu .tk-gastro-variant:has(> .tk-gastro-offer-badge) > .tk-gastro-offer-old {
    grid-column:2!important;grid-row:var(--tkg-offer-line)!important;
    display:block!important;font-size:.82rem!important;line-height:1.3!important;
    padding:0!important;text-decoration:line-through!important;white-space:nowrap!important;
  }
  .tk-gastro-menu .tk-gastro-variant:has(> .tk-gastro-offer-badge) > strong {
    grid-column:3!important;grid-row:var(--tkg-offer-line)!important;
    display:block!important;height:auto!important;min-height:0!important;
    padding:0!important;line-height:1.3!important;white-space:nowrap!important;
  }
  .tk-gastro-menu .tk-gastro-variant.tkg-offer-variant > .tkg-offer-price {
    display:block!important;grid-column:2 / 4!important;
    grid-row:var(--tkg-offer-line)!important;padding:0!important;text-align:right!important;
  }
  .tk-gastro-menu .tkg-offer-price-line {
    display:flex!important;align-items:baseline!important;flex-wrap:nowrap!important;
    justify-content:flex-end!important;gap:8px!important;
  }
  .tk-gastro-menu .tkg-offer-price :is(.tk-gastro-offer-old,.tkg-offer-current) {
    position:static!important;transform:none!important;flex:0 0 auto!important;
    display:block!important;width:auto!important;height:auto!important;min-height:0!important;
    margin:0!important;padding:0!important;border:0!important;line-height:1.3!important;
    white-space:nowrap!important;text-decoration:none!important;
  }
  .tk-gastro-menu .tkg-offer-price .tk-gastro-offer-old {
    font-size:.82rem!important;font-weight:400!important;text-decoration:line-through!important;
  }
  .tk-gastro-menu .tkg-offer-price .tkg-offer-current {
    font-size:1rem!important;font-weight:800!important;
  }
  .tk-gastro-menu .tkg-offer-price .tkg-offer-saving {
    display:block!important;margin:4px 0 0!important;padding:0!important;
    font-size:11px!important;font-weight:700!important;line-height:1.45!important;
  }
  .tk-gastro-menu .tk-gastro-variant:has(> .tk-gastro-offer-badge) > .tk-gastro-order-action,
  .tk-gastro-menu .tk-gastro-variant.tkg-offer-variant > .tk-gastro-order-action {
    grid-column:4!important;grid-row:var(--tkg-offer-line)!important;
    justify-self:end!important;align-self:center!important;
  }
  .tk-gastro-menu .tk-gastro-variant:has(> .tk-gastro-offer-badge) > .tk-gastro-offer-badge {
    grid-column:1 / -1!important;grid-row:var(--tkg-offer-caption-line,2)!important;
    justify-self:end!important;display:block!important;
    width:fit-content!important;max-width:100%!important;box-sizing:border-box!important;
    white-space:normal!important;overflow-wrap:anywhere!important;text-align:right!important;
  }
  .tk-gastro-menu .tk-gastro-variant:has(> .tk-gastro-offer-badge) > .tk-gastro-inline-note,
  .tk-gastro-menu .tk-gastro-variant.tkg-offer-variant > .tk-gastro-inline-note {
    grid-column:1 / -1!important;grid-row:auto!important;width:100%!important;
  }
  /* A label gets its own line only on narrow screens; price pair and controls
     stay together. An unlabeled offer does not acquire an empty extra row. */
  @media (max-width:600px) {
    .tk-gastro-menu .tk-gastro-variant:has(> .tk-gastro-offer-badge):has(> span:not(.tk-gastro-offer-old):not(.tk-gastro-offer-badge):not(.tkg-offer-price)),
    .tk-gastro-menu .tk-gastro-variant.tkg-offer-labeled {
      --tkg-offer-line:2;--tkg-offer-caption-line:3;
    }
    .tk-gastro-menu .tk-gastro-variant:has(> .tk-gastro-offer-badge) > span:not(.tk-gastro-offer-old):not(.tk-gastro-offer-badge):not(.tkg-offer-price),
    .tk-gastro-menu .tk-gastro-variant.tkg-offer-labeled > span:not(.tk-gastro-offer-badge):not(.tkg-offer-price) {
      grid-column:1 / -1!important;
    }
  }
}
