/* ==========================================================================
   Offer lists of the new site (web2): category page (top_offer_view),
   country / category list (offers_list). Builds on site2.css.
   ========================================================================== */

/* ---- page head ------------------------------------------------------------ */
.s2-crumbs [aria-hidden="true"] { color: var(--s2-field); }
.s2-crumbs [aria-current="page"] { color: var(--s2-ink); font-weight: 500; }
.s2-lmeta b { font-weight: 600; color: var(--s2-ink); }
.s2-pagehead h1 { overflow-wrap: anywhere; }

/* City pills: real buttons, several can be on at once. */
.s2-lpills .s2-pill { min-height: 44px; font-size: 15px; }
.s2-lpills .s2-pill:hover { border-color: var(--s2-blue); }
.s2-lpills .s2-pill[aria-pressed="true"]:hover { background: var(--s2-brand-dark); }
.s2-lpill__n { opacity: .75; }

/* ---- list body ------------------------------------------------------------ */
.s2-lbody { padding-top: 24px; padding-bottom: 24px; }
.s2-lbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; min-height: 44px; }
.s2-lbar__shown { color: var(--s2-muted); }
.s2-lbar__shown:focus { outline: none; }
.s2-lsub { margin: 0; font-size: 22px; font-weight: 600; }
.s2-lsort { display: flex; gap: 10px; align-items: center; font-size: 15px; margin: 0; }
.s2-lsort select { min-height: 44px; border: 1px solid var(--s2-field); border-radius: 8px; padding: 0 12px; font: inherit; background: var(--s2-surface); color: var(--s2-ink); }
.s2-lsort[hidden] { display: none; }

/* Each card sits in a cell that carries its price for sorting. */
.s2-lgrid { transition: opacity .15s; }
.s2-lgrid[aria-busy="true"] { opacity: .45; pointer-events: none; }
.s2-lcell { display: flex; min-width: 0; }
.s2-lcell > .s2-ocard { flex: 1 1 auto; min-width: 0; }
.s2-lcell .s2-ocard__name { overflow-wrap: anywhere; }
.s2-lcell .s2-ocard__body { min-width: 0; }
.s2-lempty, .s2-lerror { grid-column: 1 / -1; text-align: center; padding: 48px 16px; color: var(--s2-muted); font-size: 18px; border: 1px dashed var(--s2-field); border-radius: 12px; }
.s2-lerror { color: var(--s2-bad); background: var(--s2-bad-soft); border-style: solid; border-color: color-mix(in srgb, var(--s2-bad) 30%, transparent); }

/* ---- pager (buttons/links + gap) ------------------------------------------ */
.s2-pager a { text-decoration: none; }
.s2-pager a:hover { border-color: var(--s2-blue); color: var(--s2-blue); }
.s2-pager a[aria-current="page"]:hover { color: #fff; }
.s2-pager .s2-pager__gap { border: 0; min-width: 24px; padding: 0; }
.s2-lpager[hidden] { display: none; }

/* ---- subcategory tiles (category with children) --------------------------- */
.s2-subcats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 260px; gap: 18px; }
.s2-subcats .s2-tile { min-height: 0; }
.s2-subcats .s2-tile__meta { margin-top: 4px; }
.s2-subcats .s2-tile__go { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; min-height: 36px; padding: 0 14px; border-radius: 8px; background: var(--s2-sun); color: var(--s2-navy); font-weight: 600; font-size: 15px; }
.s2-subcats .s2-tile--noimg { background: var(--s2-brand); }

/* ---- partner offer (status 2) in a modal iframe -------------------------- */
.s2-lmodal { position: fixed; inset: 0; z-index: 9999; background: rgba(5, 16, 54, .7); display: flex; align-items: center; justify-content: center; padding: 16px; }
.s2-lmodal[hidden] { display: none; }
.s2-lmodal__box { background: var(--s2-surface); border-radius: 14px; width: 100%; max-width: 1100px; height: 90vh; display: flex; flex-direction: column; overflow: hidden; }
.s2-lmodal__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 20px; border-bottom: 1px solid var(--s2-line); }
.s2-lmodal__head h2 { margin: 0; font-size: 18px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s2-lmodal__close { flex: none; width: 44px; height: 44px; border: 0; border-radius: 8px; background: none; font-size: 28px; line-height: 1; cursor: pointer; color: var(--s2-muted); }
.s2-lmodal__close:hover { background: var(--s2-bg); color: var(--s2-ink); }
.s2-lmodal__body { position: relative; flex: 1; }
.s2-lmodal__loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--s2-muted); }
.s2-lmodal__body iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---- responsive ----------------------------------------------------------- */
@media (max-width: 900px) {
    .s2-subcats { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 200px; }
}
@media (max-width: 560px) {
    .s2-pagehead .s2-wrap { padding-top: 16px; padding-bottom: 12px; }
    .s2-pagehead h1 { font-size: 26px; margin-top: 6px; }
    .s2-pagehead .s2-lmeta { font-size: 15px; }
    /* Pills scroll sideways inside their own strip; the page itself never does. */
    .s2-lpills { flex-wrap: nowrap; overflow-x: auto; margin: 12px -24px 0; padding: 0 24px 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    .s2-lpills::-webkit-scrollbar { display: none; }
    .s2-lpills .s2-pill { flex: none; white-space: nowrap; }
    .s2-lbody { padding-top: 12px; }
    .s2-lbar { margin-bottom: 12px; font-size: 14px; }
    .s2-lsort { font-size: 14px; }
    .s2-cards--3.s2-lgrid { gap: 12px; }
    .s2-lgrid .s2-ocard--row .s2-ocard__body { padding: 10px 12px; gap: 2px; }
    .s2-lgrid .s2-ocard--row .s2-ocard__where { font-size: 13px; }
    .s2-lgrid .s2-ocard--row .s2-ocard__name { font-size: 17px; }
    .s2-lgrid .s2-ocard--row .s2-ocard__price { font-size: 20px; }
    .s2-lgrid .s2-ocard--row .s2-ocard__go { display: none; }
    .s2-lgrid .s2-ocard--row .s2-ocard__img .s2-chip { top: 6px; left: 6px; font-size: 12px; padding: 2px 8px; }
    .s2-subcats { grid-template-columns: 1fr; grid-auto-rows: 180px; gap: 12px; }
    .s2-lmodal { padding: 0; }
    .s2-lmodal__box { height: 100%; border-radius: 0; }
}
