/* ==========================================================================
   Top-casino list (the "вітрина" block from the reference layout)
   ========================================================================== */

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Green CTA above the trust strip */
.tl-maincta-wrap {
  display: flex;
  justify-content: center;
  margin: 18px 0 16px;
}

.tl-maincta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 32px;
  border-radius: 12px;
  background: #16a34a;
  color: #ffffff !important;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none !important;
  box-shadow: 0 10px 24px rgba(22, 163, 74, .28);
  transition: background .15s ease, transform .1s ease;
}

.tl-maincta:hover {
  background: #128a3f;
}

.tl-maincta:active {
  transform: scale(.99);
}

.tl-maincta span[aria-hidden] {
  transition: transform .15s ease;
}

.tl-maincta:hover span[aria-hidden] {
  transform: translateX(3px);
}

/* --------------------------------------------------------------------------
   List
   -------------------------------------------------------------------------- */
.top-list {
  list-style: none;
  margin: 22px 0 10px;
  padding: 0;
  display: grid;
  gap: 20px;
}

.tl-card {
  position: relative;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) auto auto 150px;
  grid-template-areas:
    "logo bonus rate score cta"
    "terms terms terms terms terms";
  align-items: center;
  column-gap: 24px;
  row-gap: 8px;
  padding: 16px 18px 2px;
  background: #ffffff;
  border: 1px solid #e4e7e2;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(16, 32, 27, .05);
}

.tl-card--first {
  border: 2px solid #d9b451;
  box-shadow: 0 8px 24px rgba(217, 180, 81, .18);
}

/* Rank badge, overlapping the top-left corner */
.tl-rank {
  position: absolute;
  top: -11px;
  left: -11px;
  z-index: 2;
  min-width: 34px;
  padding: 4px 8px;
  border-radius: 7px;
  background: #16794a;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}

/* Ribbon on the top edge */
.tl-label {
  position: absolute;
  top: -12px;
  left: 50%;
  z-index: 2;
  transform: translateX(-50%);
  padding: 4px 16px;
  border-radius: 4px;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  white-space: nowrap;
}

.tl-label--gold { background: #c8a24a; }
.tl-label--blue { background: #2563eb; }
.tl-label--green { background: #157347; }

/* Logo tile */
.tl-logo {
  grid-area: logo;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 118px;
  border-radius: 8px;
}

.tl-logo img {
  width: auto;
  max-width: 76%;
  max-height: 66%;
  object-fit: contain;
  border-radius: 0;
}

.tl-info {
  position: absolute;
  top: -7px;
  right: -7px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: #3b82f6;
  color: #ffffff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
  font-style: italic;
  font-weight: 700;
  line-height: 1;
  cursor: help;
}

/* Offer */
.tl-bonus {
  grid-area: bonus;
  margin: 0;
  color: #111827;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: .005em;
  text-align: center;
}

/* Rating */
.tl-rate {
  grid-area: rate;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 96px;
}

.tl-rate-label {
  color: #6b7280;
  font-size: 11.5px;
  line-height: 1.2;
  white-space: nowrap;
}

.tl-stars {
  color: #e0a92e;
  font-size: 15px;
  letter-spacing: 1px;
  line-height: 1;
  white-space: nowrap;
}

/* Score */
.tl-score {
  grid-area: score;
  min-width: 62px;
  color: #15803d;
  font-size: 44px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.03em;
  text-align: center;
}

/* CTA */
.tl-cta {
  grid-area: cta;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.tl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 6px;
  background: #157347;
  color: #ffffff !important;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none !important;
  transition: background .15s ease;
}

.tl-btn:hover {
  background: #115c38;
}

.tl-visit {
  color: #374151;
  font-size: 11.5px;
  text-underline-offset: 2px;
}

/* Terms row */
.tl-terms {
  grid-area: terms;
  position: relative;
  padding: 0 30px 12px;
}

.tl-terms-text {
  margin: 0;
  color: #6b7280;
  font-size: 10.5px;
  line-height: 1.55;
  text-align: center;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  overflow: hidden;
}

.tl-card--first .tl-terms-text {
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.tl-card.is-open .tl-terms-text {
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  overflow: visible;
}

.tl-more {
  position: absolute;
  right: 2px;
  bottom: 6px;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #9aa3a9;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: transform .15s ease, color .15s ease;
}

.tl-more:hover {
  color: #4b5563;
}

.tl-card.is-open .tl-more {
  transform: rotate(180deg);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1180px) {
  .tl-card {
    grid-template-columns: 180px minmax(0, 1fr) auto auto 140px;
    column-gap: 16px;
  }

  .tl-bonus {
    font-size: 17px;
  }

  .tl-score {
    font-size: 38px;
    min-width: 54px;
  }
}

@media (max-width: 900px) {
  .tl-card {
    grid-template-columns: 150px minmax(0, 1fr) auto auto 124px;
    column-gap: 12px;
    padding: 14px 14px 2px;
  }

  .tl-logo {
    height: 96px;
  }

  .tl-bonus {
    font-size: 15.5px;
  }

  .tl-rate {
    min-width: 82px;
  }

  .tl-rate-label {
    font-size: 10.5px;
  }

  .tl-stars {
    font-size: 13px;
  }

  .tl-score {
    font-size: 32px;
    min-width: 46px;
  }

  .tl-btn {
    min-height: 34px;
    padding: 0 10px;
    font-size: 11.5px;
  }

  .tl-visit {
    font-size: 10.5px;
  }
}

@media (max-width: 760px) {
  .top-list {
    gap: 26px;
    margin-top: 26px;
  }

  .tl-card {
    grid-template-columns: 1fr;
    grid-template-areas:
      "logo"
      "bonus"
      "rate"
      "score"
      "cta"
      "terms";
    justify-items: center;
    row-gap: 10px;
    padding: 18px 14px 2px;
  }

  .tl-logo {
    width: min(100%, 250px);
    height: 118px;
  }

  .tl-bonus {
    font-size: 17px;
    text-align: center;
  }

  .tl-rate {
    align-items: center;
  }

  .tl-score {
    font-size: 36px;
    text-align: center;
  }

  .tl-cta {
    width: 100%;
    align-items: center;
  }

  .tl-btn {
    width: 100%;
  }

  .tl-terms {
    padding: 6px 26px 12px;
  }

  .tl-terms-text,
  .tl-card--first .tl-terms-text {
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  .tl-rank {
    top: -10px;
    left: -6px;
  }

  .tl-label {
    top: -11px;
    padding: 3px 12px;
    font-size: 10px;
  }
}

/* The theme appends a "↗" to every target=_blank link; the reference block
   does not use it. */
.top-list a::after {
  content: none !important;
}

/* Chevron button: drawn with borders so it renders identically everywhere. */
.tl-more {
  font-size: 0;
}

.tl-more::before {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  margin: 0 auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .15s ease;
}

.tl-card.is-open .tl-more {
  transform: none;
}

.tl-card.is-open .tl-more::before {
  transform: translateY(2px) rotate(-135deg);
}
