/*
Theme Name: Slotology
Theme URI: https://slotology.net
Author: Slotology
Description: Lightweight custom theme for the Slotology slot game affiliate directory. Built around Games, Providers, and Casinos custom post types, filtered via FacetWP.
Version: 1.0.0
Requires PHP: 8.0
Text Domain: slotology
*/

:root{
  --bg:#12141f;
  --bg-alt:#0d0e17;
  --panel:#1a1d2c;
  --panel-hover:#20243a;
  --line:#2a2e42;
  --text:#edeef3;
  --muted:#8a8fa3;
  --teal:#4fd1c5;
  --teal-dim:#2d7a72;
  --silver:#c9ccd6;
  --silver-dim:#6b6f7d;
  --melon:#e0524f;
  --high:#e0524f;
  --med:#c9ccd6;
  --low:#4fd1c5;
  --radius:10px;
  --content-max:1400px;
}

*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
body{
  background:var(--bg);
  color:var(--text);
  font-family:'Inter',-apple-system,BlinkMacSystemFont,sans-serif;
  min-height:100vh;
}
a{color:inherit;text-decoration:none;}
img{max-width:100%;display:block;}
::selection{background:var(--teal);color:#12141f;}

/* ---------- HEADER ---------- */
.site-header{
  border-bottom:1px solid var(--line);
  padding:18px 32px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  background:linear-gradient(180deg, var(--bg-alt), var(--bg));
  position:sticky;
  top:0;
  z-index:50;
}
.site-header .custom-logo-link img{height:44px;width:auto;}
.site-header .brand-fallback{
  font-family:'Space Grotesk',sans-serif;
  font-weight:700;
  font-size:22px;
}
.site-header .brand-fallback span{color:var(--teal);}

.primary-nav ul{
  list-style:none;
  display:flex;
  gap:28px;
  margin:0;padding:0;
}
.primary-nav a{
  font-size:13.5px;
  color:var(--muted);
  transition:color .15s ease;
}
.primary-nav a:hover{color:var(--teal);}

/* ---------- FOOTER ---------- */
.site-footer{
  border-top:1px solid var(--line);
  padding:32px;
  margin-top:60px;
  color:var(--muted);
  font-size:12.5px;
  line-height:1.7;
}
.site-footer .disclosure{
  max-width:900px;
  margin:0 auto 16px auto;
}
.site-footer .footer-links{
  display:flex;
  gap:18px;
  justify-content:center;
  margin-bottom:16px;
  flex-wrap:wrap;
}
.site-footer .responsible-gambling{
  text-align:center;
  font-family:'IBM Plex Mono',monospace;
  font-size:11px;
  letter-spacing:0.06em;
  color:var(--silver-dim);
}

/* ---------- LAYOUT: FILTER + GRID ---------- */
.game-directory-layout{
  display:grid;
  grid-template-columns:280px 1fr;
  gap:0;
  max-width:var(--content-max);
  margin:0 auto;
}
@media (max-width:860px){
  .game-directory-layout{grid-template-columns:1fr;}
}

.filter-sidebar{
  border-right:1px solid var(--line);
  padding:28px 24px;
  position:sticky;
  top:81px;
  align-self:start;
  max-height:calc(100vh - 81px);
  overflow-y:auto;
}
@media (max-width:860px){
  .filter-sidebar{position:static;max-height:none;border-right:none;border-bottom:1px solid var(--line);}
}

.filter-group{margin-bottom:28px;}
.filter-label{
  font-family:'IBM Plex Mono',monospace;
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:0.12em;
  color:var(--teal);
  margin-bottom:12px;
}

/* FacetWP override styling — keeps facet output on-brand without fighting default plugin CSS */
.facetwp-facet{margin-bottom:4px;}
.facetwp-checkbox{
  display:flex;
  align-items:center;
  gap:10px;
  padding:7px 0;
  font-size:13.5px;
  cursor:pointer;
}
.facetwp-checkbox .facetwp-display-value{color:var(--text);}
.facetwp-checkbox .facetwp-counter{
  margin-left:auto;
  font-family:'IBM Plex Mono',monospace;
  font-size:11px;
  color:var(--muted);
}
.facetwp-slider-wrap{padding:10px 4px 4px 4px;}
.facetwp-slider{background:var(--line) !important;}
.facetwp-slider .ui-slider-range{background:var(--teal) !important;}
.facetwp-slider .ui-slider-handle{
  background:var(--teal) !important;
  border:3px solid var(--bg) !important;
  box-shadow:0 0 0 1px var(--teal);
}
.facetwp-slider-label{
  font-family:'IBM Plex Mono',monospace;
  font-size:11px;
  color:var(--muted);
  margin-top:6px;
}

.reset-filters{
  width:100%;
  padding:10px;
  background:transparent;
  border:1px solid var(--line);
  color:var(--muted);
  font-family:'IBM Plex Mono',monospace;
  font-size:11px;
  letter-spacing:0.08em;
  text-transform:uppercase;
  border-radius:var(--radius);
  cursor:pointer;
}
.reset-filters:hover{border-color:var(--teal);color:var(--teal);}

/* ---------- MAIN GRID ---------- */
.game-results{padding:28px 32px;}
.results-bar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:20px;
  padding-bottom:16px;
  border-bottom:1px solid var(--line);
}
.results-count{font-family:'Space Grotesk',sans-serif;font-size:16px;font-weight:600;}
.results-count span{color:var(--teal);}

.game-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(240px, 1fr));
  gap:16px;
}

.game-card{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:18px;
  transition:border-color .15s ease, transform .15s ease;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.game-card:hover{border-color:var(--silver-dim); transform:translateY(-2px);}

.game-card-thumb{
  position:relative;
  width:calc(100% + 36px);
  aspect-ratio:1/1;
  border-radius:8px;
  overflow:hidden;
  background:var(--bg-alt);
  margin:-18px -18px 2px -18px;
}
.game-card-thumb img{width:100%;height:100%;object-fit:cover;}
.rtp-badge{
  position:absolute;
  top:8px;left:8px;
  font-family:'IBM Plex Mono',monospace;
  font-size:11.5px;
  font-weight:600;
  padding:3px 8px;
  border-radius:20px;
  background:rgba(13,14,23,0.72);
  backdrop-filter:blur(2px);
  border:1px solid;
}

.game-name{font-family:'Space Grotesk',sans-serif;font-weight:600;font-size:15.5px;line-height:1.25;}
.provider-name{font-size:11.5px;color:var(--muted);}

.card-meta{
  display:flex;justify-content:space-between;align-items:center;
  font-size:12px;color:var(--muted);
}
.vol-tag{display:flex;align-items:center;gap:6px;text-transform:capitalize;}
.vol-icon{width:26px;height:14px;flex-shrink:0;}
.max-win{font-family:'IBM Plex Mono',monospace;}

.play-btn{
  margin-top:4px;
  display:block;
  text-align:center;
  padding:10px;
  background:var(--teal);
  color:#0d1f1d;
  font-weight:600;
  font-size:13px;
  border-radius:8px;
  transition:filter .15s ease;
}
.play-btn:hover{filter:brightness(1.08);}

.empty-state{
  grid-column:1/-1;
  text-align:center;
  padding:60px 20px;
  color:var(--muted);
  font-family:'IBM Plex Mono',monospace;
  font-size:13px;
}

/* ---------- SINGLE GAME PAGE ---------- */
.single-game-wrap{max-width:960px;margin:0 auto;padding:40px 32px;}
.single-game-hero{
  display:grid;
  grid-template-columns:280px 1fr;
  gap:32px;
  margin-bottom:36px;
}
@media (max-width:700px){.single-game-hero{grid-template-columns:1fr;}}
.single-game-hero .hero-thumb{
  border-radius:var(--radius);
  overflow:hidden;
  background:var(--panel);
  border:1px solid var(--line);
  aspect-ratio:1/1;
}
.single-game-hero .hero-thumb img{width:100%;height:100%;object-fit:cover;}

.stat-row{display:flex;gap:24px;flex-wrap:wrap;margin:20px 0;}
.stat-block{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:14px 18px;
  min-width:110px;
}
.stat-block .stat-label{
  font-family:'IBM Plex Mono',monospace;
  font-size:10px;
  text-transform:uppercase;
  letter-spacing:0.1em;
  color:var(--muted);
  margin-bottom:6px;
}
.stat-block .stat-value{font-family:'Space Grotesk',sans-serif;font-weight:600;font-size:18px;}

.casino-offer-list{display:flex;flex-direction:column;gap:12px;margin-top:12px;}
.casino-offer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:16px 20px;
  flex-wrap:wrap;
}
.casino-offer .casino-name{font-family:'Space Grotesk',sans-serif;font-weight:600;font-size:15px;}
.casino-offer .casino-bonus{font-size:13px;color:var(--muted);margin-top:2px;}
.casino-offer .play-btn{margin-top:0;padding:10px 22px;white-space:nowrap;}

.affiliate-disclosure{
  font-size:11.5px;
  color:var(--silver-dim);
  border-top:1px solid var(--line);
  margin-top:36px;
  padding-top:16px;
}

/* ---------- PROVIDER PAGES ---------- */
.provider-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(220px, 1fr));
  gap:16px;
  max-width:var(--content-max);
  margin:0 auto;
  padding:32px;
}
.provider-card{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:20px;
  text-align:center;
}
.provider-card img{height:48px;width:auto;margin:0 auto 12px auto;}
.provider-card .provider-title{font-family:'Space Grotesk',sans-serif;font-weight:600;font-size:15px;}
.provider-card .provider-count{font-size:12px;color:var(--muted);margin-top:4px;}

/* ---------- FACETWP: real widget overrides ---------- */
/* Checkboxes — FacetWP renders these as div.facetwp-checkbox with a
   background-image sprite, not real <input> elements, so we draw our
   own box via ::before/::after instead of relying on accent-color. */
.facetwp-facet .facetwp-checkbox{
  position:relative;
  padding-left:26px !important;
  background:none !important;
  cursor:pointer;
}
.facetwp-facet .facetwp-checkbox::before{
  content:'';
  position:absolute;
  left:0;
  top:50%;
  transform:translateY(-50%);
  width:15px;
  height:15px;
  border:1.5px solid var(--line);
  border-radius:4px;
  background:var(--bg-alt);
  box-sizing:border-box;
  transition:background .12s ease, border-color .12s ease;
}
.facetwp-facet .facetwp-checkbox.checked::before{
  background:var(--teal);
  border-color:var(--teal);
}
.facetwp-facet .facetwp-checkbox.checked::after{
  content:'';
  position:absolute;
  left:5px;
  top:45%;
  width:4px;
  height:8px;
  border:solid #0d1f1d;
  border-width:0 2px 2px 0;
  transform:translateY(-65%) rotate(45deg);
}
/* Fallback in case a given facet type does render a real input somewhere */
.facetwp-facet input[type="checkbox"],
.facetwp-facet input[type="radio"]{
  accent-color: var(--teal);
  width:16px;height:16px;
  cursor:pointer;
}

/* Slider facet — FacetWP uses noUiSlider under the hood, not jQuery UI,
   so it needs its own selectors (the .ui-slider-* rules above are a
   harmless no-op fallback and can stay). */
.facetwp-facet .noUi-target{
  background:var(--line);
  border:none;
  box-shadow:none;
  height:4px;
}
.facetwp-facet .noUi-connect{
  background:var(--teal);
}
.facetwp-facet .noUi-handle{
  width:16px !important;
  height:16px !important;
  top:-6px !important;
  right:-8px !important;
  border-radius:50%;
  background:var(--teal);
  border:3px solid var(--bg);
  box-shadow:0 0 0 1px var(--teal);
  cursor:pointer;
}
.facetwp-facet .noUi-handle:before,
.facetwp-facet .noUi-handle:after{
  display:none; /* hide noUiSlider's default handle grip lines */
}
.facetwp-facet .noUi-tooltip{
  background:var(--panel);
  border:1px solid var(--line);
  color:var(--text);
  font-family:'IBM Plex Mono',monospace;
  font-size:11px;
}

/* Per-facet auto "Reset" button FacetWP injects (e.g. under the slider) */
.facetwp-facet .facetwp-slider-reset,
.facetwp-facet button{
  background:var(--panel);
  color:var(--muted);
  border:1px solid var(--line);
  border-radius:6px;
  padding:5px 12px;
  font-family:'IBM Plex Mono',monospace;
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:0.06em;
  cursor:pointer;
}
.facetwp-facet .facetwp-slider-reset:hover,
.facetwp-facet button:hover{
  border-color:var(--teal);
  color:var(--teal);
}
