@import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap");

ul { padding: 0; list-style: none; }

/* ─────────────────────────────────
   LIST WRAPPER
───────────────────────────────── */
.tmp-casino-list {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  font-family: "Montserrat", sans-serif;
}
.tmp-casino-list a { color: #000; text-decoration: none !important; }
.tmp-casino-list > div.tmp-hidden,
.tmp-casino-list > li.tmp-hidden { display: none; }

/* ─────────────────────────────────
   CARD SHELL
───────────────────────────────── */
.tmp-casino-item {
  position: relative;
  padding: 2px;
  background: linear-gradient(89.17deg, #ffd073 -3.81%, rgba(150,218,152,.8) 37.4%, #ffd073 100.51%);
  border-radius: 16px;
  box-shadow: 0 2px 5px rgba(0,0,0,.05);
}

.tmp-casino-item:nth-child(1) .tmp-casino-item_inner { outline: 2px solid #f3b400; background: #fffdf6; }
.tmp-casino-item:nth-child(2) .tmp-casino-item_inner { outline: 2px solid #c0c0c0; background: #fafafa; }
.tmp-casino-item:nth-child(3) .tmp-casino-item_inner { outline: 2px solid #cd7f32; background: #fdf8f0; }

.tmp-casino-item:nth-child(1) .tmp-casino-item_inner::before { content: "🏆 #1"; background: #ffe08a; color: #3a2a00; }
.tmp-casino-item:nth-child(2) .tmp-casino-item_inner::before { content: "🥈 #2"; background: #e8e8e8; color: #2a2a2a; }
.tmp-casino-item:nth-child(3) .tmp-casino-item_inner::before { content: "🥉 #3"; background: #f4d03f; color: #3d2914; }
.tmp-casino-item_inner::before {
  position: absolute; top: 8px; left: 8px;
  font-size: 11px; padding: 4px 8px; border-radius: 6px;
  font-weight: 700; z-index: 2; line-height: 1.4;
}

.tmp-casino-item[data-label]::before {
  z-index: 3; content: attr(data-label);
  position: absolute; top: 18px; left: 18px;
  background-color: #a9003e; color: #fff;
  padding: 4px 6px; border-radius: 5px;
  font-weight: 400; font-size: 14px;
}

/* ─────────────────────────────────
   SHARED TOKENS
───────────────────────────────── */
a.tmp-casino-name-link { color: #6e5718; }
a.tmp-casino-name-link:hover { text-decoration: underline !important; }
span.tmp-casino-name-link { color: #6e5718; cursor: default; text-decoration: none !important; }

.tmp-casino-rating {
  flex-shrink: 0;
  display: inline-block;
  padding: 1px 6px;
  border-radius: 5px;
  font-weight: 700; font-size: 14px; line-height: 1.5;
  white-space: nowrap;
}
.rating-excellent { background: #c7f4cd; color: #00570d; }
.rating-high      { background: #ffe6a5; color: #6f5718; }
.rating-medium    { background: #ffe6a5; color: #6f5718; }
.rating-low       { background: #ffd3dd; color: #8c0522; }

.tmp-button {
  display: block;
  background: linear-gradient(90deg, #159b29 0%, #4cba5c 47%, #159b29 100%);
  color: #fff !important;
  font-weight: 700; font-size: 13px; line-height: 1;
  padding: 14px 16px; border-radius: 8px;
  cursor: pointer; text-transform: uppercase;
  text-decoration: none !important; text-align: center;
  letter-spacing: .4px; white-space: nowrap;
}
.tmp-button:hover { opacity: .9; }

.tmp-avis-text { font-size: 12px; text-align: center; color: #666; }
.tmp-link-to-review { color: #777; }
.tmp-link-to-review:hover { text-decoration: underline; color: #333; }

.tmp-button-load {
  display: block; margin: 12px auto 0;
  background: #6b7280; color: #fff;
  font-weight: 600; border: none; font-size: 13px;
  padding: 12px 28px; border-radius: 8px;
  cursor: pointer; font-family: "Montserrat", sans-serif;
  text-transform: uppercase;
}
.tmp-button-load:hover { background: #555; }

.partner-highlight .tmp-casino-item_inner { background: #fffbf2; }
.partner-highlight a.tmp-casino-name-link { color: #6e5718 !important; }

/* ═══════════════════════════════════════════════════
   FULL VIEW — original flex layout, desktop
   [logo 108px] + [content] + [usps] + [btns]
═══════════════════════════════════════════════════ */
.tmp-casino-item_inner {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 11px;
  border-radius: 14px;
  background: #fbfbfb;
  overflow: hidden;
  gap: 0;
}

.tmp-casino-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tmp-casino-logo-wrapper {
  flex-shrink: 0;
  width: 108px; min-height: 90px;
  border-radius: 12px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.tmp-casino-logo-link {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
}
.tmp-casino-logo {
  display: block;
  width: 100%; height: 100%; min-height: 90px;
  object-fit: contain;
}

.tmp-casino-content {
  display: flex; flex-direction: column; gap: 4px;
  max-width: 220px;
}
.tmp-casino-name {
  display: flex; align-items: center; gap: 6px;
  font-weight: 700; font-size: 20px; line-height: 1.2;
  margin-bottom: 8px; flex-wrap: wrap;
}
.tmp-casino-content .tmp-welcome-offer {
  font-size: 14px; font-weight: 400; color: #4a4a4a;
}
.tmp-casino-content .tmp-welcome-offer b {
  display: block; font-weight: 600; font-size: 15px;
  margin-top: 2px; color: #222;
}

.tmp-usps {
  display: flex; flex-direction: column;
  align-items: flex-start; justify-content: center;
  gap: 7px; list-style: none; margin: 0;
  padding: 0 8px; flex-shrink: 0; max-width: 220px;
}
.tmp-usps li { font-size: 12px; font-weight: 500; line-height: 1.35; color: #4a4a4a; }

.tmp-casino-btns {
  display: flex; flex-direction: column;
  align-items: center; gap: 8px; flex-shrink: 0;
}
.tmp-casino-btns .tmp-button {
  width: max-content; min-width: 120px;
  font-size: 14px; padding: 16px 12px;
}

/* ═══════════════════════════════════════════════════
   SIMPLE VIEW — DESKTOP (≥ 769px)

   .sv-top-row  = 3 cols: [logo 120px] [sv-text] [sv-bonus-col]
   .tmp-casino-btns = sits below .sv-top-row, right-aligned

   The _inner becomes a flex-column with two rows:
     row 1: sv-top-row (flex-grow)
     row 2: btns (right-aligned)

   Actually cleanest: _inner stays flex-row but sv-top-row
   takes flex:1 and becomes a 3-col grid internally.
═══════════════════════════════════════════════════ */
.simple-view .tmp-casino-item_inner {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  padding: 0;
  min-height: 96px;
  overflow: hidden;
}

/* sv-top-row: 3-col grid inside the card */
.simple-view .sv-top-row {
  display: grid;
  grid-template-columns: 120px 1fr 1fr;
  align-items: center;
  flex: 1;
  min-width: 0;
}

/* col 1: logo square with brand bg */
.simple-view .sv-logo-wrap {
  align-self: stretch;
  display: flex; align-items: center; justify-content: center;
  padding: 10px 8px;
  border-radius: 0; overflow: hidden;
}
.simple-view .sv-logo-wrap .tmp-casino-logo-link {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}
.simple-view .sv-logo-wrap .tmp-casino-logo {
  width: 100%; height: auto; max-height: 76px; min-height: unset;
  object-fit: contain;
}

/* col 2: name + rating (hide the inline bonus on desktop) */
.simple-view .sv-text {
  padding: 14px 10px 14px 12px;
  display: flex; flex-direction: column; gap: 4px;
  justify-content: center;
}
.simple-view .sv-text .tmp-welcome-offer { display: none; } /* hidden on desktop — shown in sv-bonus-col */
.simple-view .sv-text .tmp-casino-name {
  font-size: 16px; margin-bottom: 2px;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-weight: 700; line-height: 1.2;
}

/* col 3: bonus column (desktop only) */
.simple-view .sv-bonus-col {
  display: flex; flex-direction: column; justify-content: center;
  padding: 14px 12px;
  border-left: 1px solid rgba(0,0,0,.07);
  gap: 3px;
}

.offer-label {
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .7px; color: #aaa;
}
.offer-value {
  font-size: 15px; font-weight: 700; color: #1a1a1a; line-height: 1.3;
}

/* CTA column — sits to the right of sv-top-row */
.simple-view .tmp-casino-btns {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 7px; padding: 12px 14px; flex-shrink: 0;
  border-left: 1px solid rgba(0,0,0,.07);
  min-width: 150px;
}
.simple-view .tmp-casino-btns .tmp-button {
  width: 100%; min-width: unset;
  font-size: 12px; padding: 12px 10px;
}
.simple-view .tmp-avis-text { font-size: 11px; }

/* ═══════════════════════════════════════════════════
   MOBILE ≤ 768px — BOTH VIEWS

   Target layout (matching the Hungarian reference):
   ┌─────────────────────────────────┐
   │  [Logo sq]  Name  [rating]      │
   │             Welcome label       │
   │             Bonus value         │
   │  [      SIGN UP BUTTON       ]  │
   │  Review link (if any)           │
   └─────────────────────────────────┘
═══════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* ── FULL VIEW mobile ── */
  .tmp-casino-item_inner {
    display: flex !important;
    flex-direction: column !important;
    padding: 12px !important;
    gap: 10px !important;
    align-items: stretch !important;
  }

  .tmp-casino-info {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px;
  }

  .tmp-casino-logo-wrapper {
    flex-shrink: 0;
    width: 96px !important; height: 96px !important;
    min-height: unset !important;
    border-radius: 12px !important;
    padding: 8px !important;
  }
  .tmp-casino-logo { min-height: unset !important; height: 100% !important; }

  .tmp-casino-content { max-width: none !important; padding: 0 !important; flex: 1; }
  .tmp-casino-name { font-size: 16px !important; margin-bottom: 4px !important; }
  .tmp-casino-content .tmp-welcome-offer { font-size: 12px; }
  .tmp-casino-content .tmp-welcome-offer b { font-size: 13px; }

  .tmp-usps { display: none !important; }

  .tmp-casino-btns {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 6px !important;
    padding: 0 !important;
  }
  .tmp-casino-btns .tmp-button {
    width: 100% !important; min-width: unset !important;
    font-size: 14px !important; padding: 14px 12px !important;
  }
  .tmp-avis-text { font-size: 13px !important; text-align: center; }

  /* ── SIMPLE VIEW mobile ──
     Completely replace the desktop flex+grid with:
     flex-col on _inner:
       row 1: sv-top-row (flex-row: logo square + sv-text)
       row 2: tmp-casino-btns (full width)
     sv-bonus-col: hidden (bonus is inside sv-text on mobile)
  ── */
  .simple-view .tmp-casino-item_inner {
    display: flex !important;
    flex-direction: column !important;
    padding: 12px !important;
    gap: 10px !important;
    align-items: stretch !important;
    min-height: unset !important;
  }

  .simple-view .sv-top-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px;
    grid-template-columns: unset !important;
  }

  .simple-view .sv-logo-wrap {
    flex-shrink: 0;
    width: 96px !important; height: 96px !important;
    align-self: auto !important;
    border-radius: 12px !important;
    padding: 8px !important;
  }
  .simple-view .sv-logo-wrap .tmp-casino-logo {
    max-height: none !important;
    height: 100% !important;
    width: 100% !important;
  }

  .simple-view .sv-text {
    flex: 1; padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    justify-content: center !important;
  }

  /* Show inline bonus on mobile, hide the desktop column */
  .simple-view .sv-text .tmp-welcome-offer {
    display: flex !important;
    flex-direction: column !important;
    gap: 1px;
  }
  .simple-view .sv-text .offer-label { font-size: 10px; color: #aaa; }
  .simple-view .sv-text .offer-value { font-size: 13px; font-weight: 700; color: #1a1a1a; }

  .simple-view .sv-bonus-col { display: none !important; }

  .simple-view .tmp-casino-btns {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 6px !important;
    padding: 0 !important;
    border-left: none !important;
    min-width: unset !important;
  }
  .simple-view .tmp-casino-btns .tmp-button {
    width: 100% !important; min-width: unset !important;
    font-size: 14px !important; padding: 14px 12px !important;
  }
  .simple-view .tmp-casino-name {
    font-size: 16px !important; margin-bottom: 2px !important;
  }
  .simple-view .tmp-avis-text { font-size: 13px !important; text-align: center; }

  /* rank badge: keep it out of the content area */
  .tmp-casino-item_inner::before {
    top: 6px !important; left: 6px !important;
    font-size: 10px !important; padding: 3px 6px !important;
    z-index: 3;
  }
  .tmp-casino-item[data-label]::before {
    top: 8px !important; left: 8px !important;
    font-size: 11px !important;
  }
}

@media (max-width: 380px) {
  .tmp-casino-logo-wrapper,
  .simple-view .sv-logo-wrap {
    width: 76px !important; height: 76px !important;
  }
  .simple-view .offer-value { font-size: 12px !important; }
}
