/*
Theme Name: BetJudges
Theme URI: https://betjudges.com
Author: BetJudges Team
Author URI: https://betjudges.com
Description: A custom, lightweight WordPress theme built for the BetJudges affiliate portal. Designed with TailwindCSS and optimized for performance and SEO.
Version: 1.0.0
Text Domain: betjudges
Domain Path: /languages
Tested up to: 6.5
Requires PHP: 7.4
*/

/* 
 * MAIN STYLES 
 * The actual CSS framework used is Tailwind via CDN (in header.php), 
 * but any custom overrides go here.
 */

body {
  background-color: #0f172a;
  color: #f1f5f9;
  font-family: 'Inter', sans-serif;
}

.rounded-eight { 
  border-radius: 8px; 
}

.primary-glow {
  box-shadow: 0 0 15px rgba(108, 242, 13, 0.2);
}

.gradient-overlay {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0) 0%, rgba(15, 23, 42, 1) 100%);
}

/* Single header metrics: 2 columns only between 513px and 767px */
@media (min-width: 513px) and (max-width: 767px) {
  .betjudges-header-metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .betjudges-header-top-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    grid-template-rows: auto auto;
    align-items: start;
  }
  .betjudges-header-logo-col {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 100%;
    height: 100%;
  }
  .betjudges-header-top-grid > :nth-child(2) {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    min-width: 0;
  }
  .betjudges-header-title-col {
    width: 100%;
    min-width: 0;
  }
  .betjudges-header-title-col .betjudges-header-rating-box {
    display: flex;
    width: 100%;
  }
  .betjudges-header-cta-col {
    grid-column: 2;
    grid-row: 2;
    align-items: stretch;
    justify-content: flex-start;
    margin-top: 0;
  }
  .betjudges-header-cta-col > a,
  .betjudges-header-cta-col > span[aria-disabled="true"] {
    max-width: none;
  }
}

@media (max-width: 512px) {
  .single-casino .betjudges-header-top-grid,
  .single-bookmaker .betjudges-header-top-grid,
  .single-bingo .betjudges-header-top-grid,
  .single-bono .betjudges-header-top-grid {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
  }
  .single-casino .betjudges-header-title-col,
  .single-bookmaker .betjudges-header-title-col,
  .single-bingo .betjudges-header-title-col,
  .single-bono .betjudges-header-title-col {
    align-items: center;
  }
  .single-casino .betjudges-header-title-col h1,
  .single-bookmaker .betjudges-header-title-col h1,
  .single-bingo .betjudges-header-title-col h1,
  .single-bono .betjudges-header-title-col h1 {
    text-align: center;
    width: 100%;
  }
  .betjudges-header-title-col .betjudges-header-rating-box {
    display: flex;
    width: 100%;
    align-items: center;
    text-align: center;
  }
  .betjudges-header-cta-col {
    align-items: stretch;
  }
  .betjudges-header-cta-col > a,
  .betjudges-header-cta-col > span[aria-disabled="true"] {
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 380px) {
  .betjudges-header-metrics-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

@media (min-width: 380px) and (max-width: 512px) {
  .betjudges-header-metrics-grid > div {
    padding: 0.5rem !important;
  }
  .betjudges-header-metrics-grid > div > span:first-child {
    white-space: nowrap;
  }
  .betjudges-bonus-value {
    font-size: 0.9rem;
  }
  .betjudges-header-metrics-grid .dashicons {
    font-size: 24px !important;
    width: 1.8rem !important;
    height: 1.8rem !important;
    line-height: 1.8rem !important;
  }
  .betjudges-header-metrics-grid > div .mt-1.flex.items-center {
    gap: 0.1rem !important;
  }
}

#single-full-review h2,
#single-full-review h3,
#single-verdict h2,
#single-verdict h3 {
  color: #fff;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

#single-full-review p,
#single-verdict p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

#single-full-review a,
#single-verdict a {
  color: #6cf20d;
}

/* Base WordPress Classes */
.aligncenter {
  display: block;
  margin: 0 auto;
}
.alignleft {
  float: left;
  margin-right: 1rem;
}
.alignright {
  float: right;
  margin-left: 1rem;
}

/* Desktop side ad rails */
.betjudges-side-ads {
  display: none;
}

@media (min-width: 1400px) {
  .betjudges-side-ads {
    display: block;
  }

  .betjudges-side-ads__rail {
    position: fixed;
    top: 92px;
    width: 160px;
    z-index: 35;
  }

  .admin-bar .betjudges-side-ads__rail {
    top: 124px;
  }

  .betjudges-side-ads__rail--left {
    left: calc(50% - 512px - 24px - 160px);
  }

  .betjudges-side-ads__rail--right {
    left: calc(50% + 512px + 24px);
  }

  .betjudges-side-ad-widget {
    background: rgba(30, 41, 59, 0.88);
    border: 1px solid rgba(71, 85, 105, 0.65);
    border-radius: 8px;
    padding: 8px;
    box-sizing: border-box;
    overflow: hidden;
  }

  .betjudges-side-ad-widget > *:last-child {
    margin-bottom: 0;
  }

  .betjudges-side-ad-widget img {
    display: block;
    width: 100%;
    height: auto;
  }

  .betjudges-side-ad-widget iframe,
  .betjudges-side-ad-widget ins {
    max-width: 100%;
  }
}
