/**
 * Unified bonus singles (free_spins, casino_offers) — layout helpers, tokens, comments section contrast.
 * Enqueued only on those singles; see ndb_enqueue_bonus_unified_assets() in functions.php.
 */

/* Dark shell for bonus singles only (scoped — does not target other templates). */
body.single-free_spins,
body.single-casino_offers {
  background-color: #0a0e1a !important;
  color: #fff !important;
}

/*
 * Do not override --hero-bg / --hero-text-* here — they come from dist/default.css (#1e1b4b indigo hero,
 * same as single-sites_cpt hero via bg-[var(--hero-bg)]). Old #191c30 made the bonus hero look grey vs casino.
 */
:root {
  --bonus-primary: #8bc34a;
  --bonus-exclusive: #9f03b4;
}

/* Preserve legacy classes for mobile app compatibility */
.h1-offer {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.2;
}
.country-offer {
  margin-bottom: 16px;
}
.best-bonus-meta {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 9px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  box-sizing: border-box;
}
/* ★ glyphs often have uneven side bearings; equal columns look centered */
.hero-left .best-bonus-meta > span {
  display: inline-flex;
  width: 1.1em;
  justify-content: center;
  flex-shrink: 0;
}
/* Logo + rating card — flat tile (no shadow/blur/border stack that reads as a “double frame” on dark heroes). */
.hero-left {
  background: #000000;
  border-radius: 16px;
  box-shadow: none;
  backdrop-filter: none;
  border: none;
}
.hero-left .ndb-logo-with-rating {
  position: relative;
  display: inline-block;
  width: fit-content;
  max-width: 100%;
}
/*
 * Tailwind v4 preflight: img { max-width:100%; height:auto } — was not a problem with Play CDN order; now it squashes logos.
 * Same pixel box as w-40 / lg:w-52 + object-cover as in 9d6943d hero.php.
 */
.hero-left .ndb-logo-with-rating > img {
  display: block;
  width: 10rem;
  height: 10rem;
  max-width: none;
  box-sizing: border-box;
  object-fit: cover;
  object-position: center;
  background-color: transparent;
  border: none;
  outline: none;
  box-shadow: none;
}
@media (min-width: 1024px) {
  .hero-left .ndb-logo-with-rating > img {
    width: 13rem;
    height: 13rem;
  }
}
.hero-left .ndb-logo-rating-row {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  box-sizing: border-box;
  pointer-events: none;
}
.hero-left .ndb-logo-rating-row .best-bonus-meta {
  pointer-events: auto;
  position: relative;
}
@media (min-width: 768px) {
  .hero-left .ndb-logo-rating-row {
    bottom: 0.625rem;
  }
  /* WP admin bar: push sticky logo down only after scroll (class toggled in footer script) */
  body.admin-bar .hero-left.ndb-hero-left--admin-scroll-offset {
    top: calc(var(--wp-admin--admin-bar--height, 32px) + 70px) !important;
  }
}

/* Mobile: logo column shrink-wraps (no full-width bar); parent is flex-col + items-center */
@media (max-width: 767px) {
  .ndb-bonus-hero-top > .ndb-bonus-hero-logo-col {
    width: auto;
    max-width: 100%;
    align-self: center;
  }
  .ndb-bonus-hero-top > .ndb-bonus-hero-logo-col > .hero-left {
    width: fit-content;
    max-width: 100%;
  }
}

/*
 * Bonus hero top row: grid (not flex items-start) so the logo column is as tall as the main column.
 * With flex + align-items: start, the logo column is only logo-height and sticky has no scroll range.
 */
@media (min-width: 768px) {
  .ndb-bonus-hero-top {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2.5rem;
    align-items: stretch;
    width: 100%;
  }
  .ndb-bonus-hero-logo-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* not justify-center — tall grid cell would vertically center the logo */
    min-width: 0;
  }
  /* Child selector beats .relative from Tailwind if it loads later with equal specificity */
  .ndb-bonus-hero-top > .ndb-bonus-hero-logo-col > .hero-left {
    position: -webkit-sticky;
    position: sticky;
    top: 1.5rem;
    z-index: 2;
  }
}

/*
 * General Information / Features / Payment — three equal columns from 768px up.
 * Defined here (not only Tailwind) so the row survives missing or stale dist/main.css.
 */
.ndb-bonus-hero-details-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 2rem;
}
@media (min-width: 768px) {
  .ndb-bonus-hero-details-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Blurry gradient effects */
.css-blurry-gradient {
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  width: 700px;
  height: 700px;
  border-radius: 50% 120% 40% 80%;
  filter: blur(50px);
  background: radial-gradient(circle at 50% 50%, rgba(76, 0, 255, 1), rgba(76, 0, 255, 0));
  opacity: 0.4;
  z-index: -1;
}
.css-blurry-gradient-1 {
  position: absolute;
  top: 100vh;
  right: 0;
  transform: translate(0%, -50%);
  width: 700px;
  height: 700px;
  border-radius: 50% 120% 40% 80%;
  filter: blur(50px);
  background: radial-gradient(circle at 50% 50%, rgb(65 31 125) 40%, rgba(76, 0, 255, 0));
  opacity: 0.4;
  z-index: -1;
}

/*
 * Hero rating strip — match .ndb-casino-single (ndb-tailwind-extras.css): red bars + icons, white scores.
 */
.ndb-hero-rating-track {
  width: 100%;
  height: 0.375rem;
  border-radius: 9999px;
  background-color: rgba(255, 255, 255, 0.2);
  overflow: hidden;
}
.ndb-hero-rating-fill {
  height: 100%;
  max-width: 100%;
  border-radius: 9999px;
  background-color: #ef4444;
  transition: width 0.3s ease;
}
/*
 * Tailwind Play CDN injects preflight after theme CSS — svg { max-width: 100%; height: auto }
 * can override normal width/height and blow these icons up to the full grid cell. Lock size hard.
 */
.ndb-hero-rating-icon {
  width: 20px !important;
  height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
  flex-shrink: 0;
  display: block;
  color: #ef4444 !important;
  opacity: 1;
  box-sizing: border-box;
}
.ndb-hero-rating-item {
  background: rgba(255, 255, 255, 0.05);
  padding: 16px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}
.ndb-hero-rating-head {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  width: 100%;
  margin-bottom: 0;
}
.ndb-hero-rating-label-wrap {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  min-width: 0;
  flex: 1 1 auto;
  font-size: 14px;
}
.ndb-hero-rating-score {
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
  white-space: nowrap;
  margin-left: auto;
}
.ndb-hero-rating-label {
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  word-break: break-word;
}

/* Responsive adjustments for mobile */
@media (max-width: 640px) {
  .ndb-hero-rating-label {
    font-size: 11px;
  }
  .ndb-hero-rating-score {
    font-size: 13px;
  }
  .ndb-hero-rating-item {
    padding: 10px;
  }
  .ndb-hero-rating-icon {
    width: 14px !important;
    height: 14px !important;
    max-width: 14px !important;
    max-height: 14px !important;
    min-width: 14px !important;
    min-height: 14px !important;
  }
  .ndb-hero-rating-label-wrap {
    gap: 4px;
  }
  /* Adjust rating track for mobile */
  .ndb-hero-rating-track {
    height: 6px;
    margin-top: 6px;
  }
}

/* Primary CTA — match .ndb-featured-bonus-cta-btn (casino hero) */
.btn-claim {
  background: #16a34a;
  color: #fff;
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition:
    background-color 0.15s ease,
    transform 0.2s ease;
  text-decoration: none;
  border: none;
}
.btn-claim:hover {
  background: #22c55e;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(22, 163, 74, 0.35);
}
.btn-secondary {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 12px 28px;
  border-radius: 12px;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
  text-decoration: none;
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
}

/* Bonus code panel — burgundy stack like .ndb-featured-bonus-card */
.ndb-bonus-hero-promo {
  border-radius: 0.75rem;
  padding: 1rem;
  margin-top: 1rem;
  background: linear-gradient(160deg, #4f0f12 0%, #2d0808 45%, #240606 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 8px 28px rgba(0, 0, 0, 0.25);
}
.ndb-bonus-hero-promo__label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(254, 202, 202, 0.95);
  margin: 0 0 0.5rem;
  text-align: center;
}
@media (min-width: 768px) {
  .ndb-bonus-hero-promo__label {
    text-align: left;
  }
}
.ndb-bonus-hero-promo__code {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  background: rgba(0, 0, 0, 0.28);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  border: 2px dashed #dc2626;
  letter-spacing: 0.08em;
}
.ndb-bonus-hero-promo__hint {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.55);
  margin: 0.5rem 0 0;
  text-align: center;
}
@media (min-width: 768px) {
  .ndb-bonus-hero-promo__hint {
    text-align: left;
  }
}
.ndb-bonus-hero-promo__copy {
  font-size: 0.75rem;
  font-weight: 700;
  background: #16a34a;
  color: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.ndb-bonus-hero-promo__copy:hover {
  background: #22c55e;
}

/* Responsible gambling band — align with .ndb-hero-rg-bar (subtle, not amber) */
.ndb-bonus-hero-rg {
  margin-top: 2.5rem;
  padding: 2rem 1.5rem;
  background: rgba(0, 0, 0, 0.28);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.ndb-bonus-hero-rg__title {
  color: #fff;
}
.ndb-bonus-hero-rg__accent {
  color: #f87171;
}

/* Author card */
.author-card {
  background: white;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  display: flex;
  gap: 24px;
  align-items: start;
}
.author-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #9f03b4;
}
.verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: #10b981;
  border-radius: 50%;
  color: white;
  font-size: 12px;
  margin-left: 6px;
}

/* Comment cards */
.comment-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* FAQ accordion */
.faq-item {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-question {
  padding: 20px;
  font-weight: 700;
  font-size: 16px;
  color: #111827;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}
.faq-question:hover {
  background: #f9fafb;
}
.faq-answer {
  padding: 0 20px 20px;
  color: #4b5563;
  line-height: 1.7;
}

/*
 * Reviews / comments (comments.php): body { color: #fff !important } would leave WP
 * markup invisible on bg-white. Scoped reset — must use !important to beat body.
 */
.ndb-bonus-comments-section {
  color: #1f2937 !important;
}
.ndb-bonus-comments-section .ndb-comments-reviews-kicker,
.ndb-bonus-comments-section .comments-title,
.ndb-bonus-comments-section .comment-reply-title,
.ndb-bonus-comments-section #reply-title {
  color: #111827 !important;
}
.ndb-bonus-comments-section .logged-in-as,
.ndb-bonus-comments-section .comment-notes,
.ndb-bonus-comments-section .required,
.ndb-bonus-comments-section label,
.ndb-bonus-comments-section .comment-author,
.ndb-bonus-comments-section .comment-content,
.ndb-bonus-comments-section .comment-meta,
.ndb-bonus-comments-section .comment-meta-item,
.ndb-bonus-comments-section .post-meta,
.ndb-bonus-comments-section .post-content,
.ndb-bonus-comments-section .no-comments,
.ndb-bonus-comments-section .comments-pagination {
  color: #374151 !important;
}
.ndb-bonus-comments-section a {
  color: #6d28d9 !important;
}
.ndb-bonus-comments-section a:hover,
.ndb-bonus-comments-section a:focus {
  color: #5b21b6 !important;
}
.ndb-bonus-comments-section input.style-1,
.ndb-bonus-comments-section textarea.style-1 {
  color: #111827 !important;
  background-color: #fff !important;
  border: 1px solid #d1d5db !important;
}

/* Sticky bar: styled in assets/css/ndb-tailwind-extras.css (same as single-sites_cpt.php) */

/* Responsive */
@media (max-width: 768px) {
  .hero-left {
    margin: 5px;
  }
  .h1-offer {
    font-size: 26px;
    margin-top: 16px;
    margin-bottom: 16px;
  }
  /* Improve mobile spacing */
  .bg-white\/5 {
    padding: 1rem !important;
  }
  /* Smaller author meta on mobile */
  .verified-badge {
    width: 14px !important;
    height: 14px !important;
    font-size: 9px !important;
  }
  /* Improve badge text wrapping on mobile */
  .flex-wrap > span {
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  /* Very small screens - improve readability */
  .h1-offer {
    font-size: 22px;
    line-height: 1.3;
  }
  /* Stack rating grid on very small screens if needed */
  .ndb-hero-rating-item {
    padding: 8px;
  }
  /* Improve Quick Facts readability */
  .bg-white\/5 {
    padding: 0.75rem !important;
  }
}
