/* JCG catalog controls, shared by front page and game-category archives. */
/* Theme tokens inherit from theme.css; a single component rule owns interactive states. */
.jcg-catalog-toolbar {
  --jcg-catalog-gap: 8px;
  --jcg-catalog-height: 38px;
  --jcg-catalog-border: #c6ddcf;
  --jcg-catalog-border-hover: #9ecdb0;
  --jcg-catalog-focus: #067545;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: var(--jcg-catalog-gap);
  overflow: visible;
  position: relative;
  margin: 0 0 12px;
  padding: 2px 0;
}
body.jcg-play-theme .jcg-catalog-action {
  display: flex;
  box-sizing: border-box;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  height: var(--jcg-catalog-height);
  min-width: 0;
  min-height: var(--jcg-catalog-height);
  margin: 0;
  padding: 7px 11px;
  background: var(--jcg-ui-surface);
  border: 1px solid var(--jcg-catalog-border);
  border-radius: 9px;
  box-shadow: none;
  color: #173d34;
  font: inherit;
  font-size: .83rem;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  list-style: none;
}
.jcg-catalog-action::-webkit-details-marker {display:none;}
body.jcg-play-theme .jcg-catalog-action:hover {
  background: var(--jcg-ui-active-bg);
  border-color: var(--jcg-catalog-border-hover);
  color: var(--jcg-ui-active-text);
}
body.jcg-play-theme .jcg-catalog-action:focus-visible {
  outline: 2px solid var(--jcg-catalog-focus);
  outline-offset: 2px;
}
body.jcg-play-theme .jcg-catalog-home {
  flex: 0 0 auto;
  justify-content: center;
  gap: 7px;
  width: auto;
  padding-inline: 12px;
}
body.jcg-play-theme .jcg-catalog-home.is-selected {
  color: #fff;
  background: var(--jcg-primary);
  border-color: var(--jcg-primary);
}
body.jcg-play-theme .jcg-catalog-home.is-selected:hover {background:var(--jcg-primary-dark);border-color:var(--jcg-primary-dark);}
.jcg-catalog-home svg {flex: 0 0 auto;}
.jcg-catalog-dropdown {position:relative;min-width:0;}
.jcg-catalog-category {width:224px;flex:0 1 224px;}
.jcg-catalog-sort {display:flex;align-items:center;gap:8px;margin-left:auto;min-width:0;}
.jcg-catalog-sort__label {font-size:.78rem;font-weight:650;color:#48695a;white-space:nowrap;}
.jcg-catalog-sort__field {width:166px;flex:0 0 166px;}
.jcg-catalog-action .jcg-catalog-label {min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.jcg-catalog-action .jcg-icon {flex:0 0 auto;}
.jcg-catalog-dropdown .jcg-catalog-action .jcg-icon {color:#436c59;transition:transform .15s ease;}
.jcg-catalog-dropdown[open] > .jcg-catalog-action {background:var(--jcg-ui-active-bg);border-color:var(--jcg-catalog-border-hover);}
.jcg-catalog-dropdown[open] > .jcg-catalog-action .jcg-icon {transform:rotate(180deg);}
.jcg-catalog-label--mobile {display:none;}
.jcg-catalog-options {
  box-sizing:border-box;
  display:block;
  position:absolute;
  top:calc(100% + 6px);
  left:0;
  z-index:160;
  width:max(100%,230px);
  max-width:calc(100vw - 32px);
  max-height:min(365px,55vh);
  overflow-x:hidden;
  overflow-y:auto;
  overscroll-behavior:contain;
  padding:5px;
  margin:0;
  list-style:none;
  background:var(--jcg-ui-surface);
  border:1px solid var(--jcg-catalog-border);
  border-radius:11px;
  box-shadow:0 10px 26px rgba(10,54,34,.15);
}
.jcg-catalog-sort__field .jcg-catalog-options {left:auto;right:0;width:max(100%,190px);}
.jcg-catalog-options li {margin:0;padding:0;list-style:none;}
body.jcg-play-theme .jcg-catalog-options a {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  min-height:36px;
  padding:8px 10px;
  border-radius:7px;
  color:#214a3c;
  font-size:.82rem;
  font-weight:600;
  line-height:1.25;
  text-decoration:none;
}
body.jcg-play-theme .jcg-catalog-options a:hover,
body.jcg-play-theme .jcg-catalog-options a:focus-visible {background:var(--jcg-ui-active-bg);color:var(--jcg-ui-active-text);}
body.jcg-play-theme .jcg-catalog-options a[aria-current=page] {background:#e5f5e9;color:#06713c;font-weight:750;}
.jcg-catalog-check {flex:0 0 auto;font-size:13px;}
/* Reuse the same disclosure and option styling for category and sorting. */
@media (max-width:850px) {
  .jcg-catalog-toolbar {
    --jcg-catalog-gap:6px;
    --jcg-catalog-height:40px;
    display:grid;
    grid-template-columns:40px minmax(0,1.34fr) minmax(0,1fr);
    align-items:stretch;
    gap:var(--jcg-catalog-gap);
    width:100%;
    min-width:0;
    margin:4px 0 12px;
    padding:0;
  }
  body.jcg-play-theme .jcg-catalog-home {width:40px;height:40px;padding:0;}
  .jcg-catalog-home__text {display:none;}
  .jcg-catalog-home svg {width:19px;height:19px;}
  .jcg-catalog-category,.jcg-catalog-sort,.jcg-catalog-sort__field {width:100%;min-width:0;max-width:100%;}
  .jcg-catalog-category,.jcg-catalog-sort__field {flex:none;}
  .jcg-catalog-sort {gap:0;margin:0;}
  .jcg-catalog-sort__label {display:none;}
  body.jcg-play-theme .jcg-catalog-dropdown .jcg-catalog-action {padding-inline:8px;gap:4px;font-size:13.5px;}
  .jcg-catalog-action .jcg-icon {width:13px;height:13px;}
  .jcg-catalog-label--desktop {display:none;}
  .jcg-catalog-label--mobile {display:inline;}
  .jcg-catalog-options {width:max(100%,216px);}
  .jcg-catalog-sort__field .jcg-catalog-options {width:max(100%,166px);}
  body.jcg-play-theme .jcg-catalog-options a {font-size:13px;}
}
@media (max-width:355px) {
  .jcg-catalog-toolbar {grid-template-columns:38px minmax(0,1.28fr) minmax(0,1fr);gap:5px;}
  body.jcg-play-theme .jcg-catalog-home {width:38px;}
  body.jcg-play-theme .jcg-catalog-dropdown .jcg-catalog-action {padding-inline:6px;gap:3px;font-size:12.5px;}
  .jcg-catalog-category .jcg-catalog-options {width:min(216px,calc(100vw - 90px));}
  .jcg-catalog-sort__field .jcg-catalog-options {width:min(170px,calc(100vw - 44px));}
}

/* Real vote count is visible beside the average; estimated ratings carry no vote count. */
.jcg-engagement__votes {font-size:.64rem;font-weight:600;color:#64796f;margin-left:2px;}
/* A user's real vote is presented separately from any editorial fallback rating. */
body.jcg-play-theme .jcg-user-rating {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin: 10px 0;
  padding: 10px 13px;
  border-radius: 12px;
}
.jcg-user-rating__title {font-weight:750;font-size:.87rem;color:#174d37;}
.jcg-user-rating__stars {display:inline-flex;align-items:center;gap:3px;}
body.jcg-play-theme .jcg-user-rating__stars button {
  padding: 5px;
  min-width: 32px;
  min-height: 32px;
  background: #f4f8f1;
  border: 1px solid #d0e1d2;
  border-radius: 7px;
  color: #c39312;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}
body.jcg-play-theme .jcg-user-rating__stars button:hover,
body.jcg-play-theme .jcg-user-rating__stars button.is-rated {background:#fff0bb;border-color:#efcf60;}
body.jcg-play-theme .jcg-user-rating__stars button:focus-visible {outline:2px solid #067545;outline-offset:2px;}
body.jcg-play-theme .jcg-user-rating__stars button:disabled {cursor:wait;opacity:.6;}
.jcg-user-rating__note {color:#496f61;font-size:.74rem;}
