/* =========================================================
   plugin.css - layout for the site blocks (.ivory-glade-*): FAQ, info table, partner strip,
   internal-link mesh, game category cards, footer columns, floating CTA bar + vertical tab.
   Colours come only from tokens.css variables (skin + mode). Loaded after flatsome.css.
========================================================= */

.ivory-glade-faq,
.ivory-glade-ops,
.ivory-glade-strip,
.ivory-glade-mesh { margin: 2.2em 0; }

.ivory-glade-title { margin-bottom: 1em; }

/* --- FAQ -------------------------------------------------------------------
 * <details>/<summary>: accordion without any JS. Answers stay in the initial DOM, so they are
 * readable by crawlers and searchable. */
.ivory-glade-faq__item {
  border: 1px solid rgba(127, 127, 127, .28);
  border-radius: 8px;
  margin-bottom: .6em;
  padding: 0 1em;
}
.ivory-glade-faq__q {
  cursor: pointer;
  font-weight: 600;
  padding: .85em 0;
  /* list-style is set too: Safari uses ::-webkit-details-marker, Firefox/Chrome use list-style on
     summary. Without both, one browser shows two markers. */
  list-style: none;
}
.ivory-glade-faq__q::-webkit-details-marker { display: none; }
.ivory-glade-faq__q::after {
  content: "+";
  float: right;
  font-weight: 400;
  margin-left: .5em;
  opacity: .6;
}
.ivory-glade-faq__item[open] > .ivory-glade-faq__q::after { content: "\2013"; }
.ivory-glade-faq__a { padding-bottom: .9em; }
.ivory-glade-faq__a p:last-child { margin-bottom: 0; }

/* --- Info table ------------------------------------------------------------
 * The overflow wrapper is required: a two-column table with long URLs or numbers would make the
 * whole body scroll sideways on phones. */
.ivory-glade-ops__wrap { overflow-x: auto; }
.ivory-glade-ops__table {
  border-collapse: collapse;
  width: 100%;
}
.ivory-glade-ops__table th,
.ivory-glade-ops__table td {
  border-bottom: 1px solid rgba(127, 127, 127, .22);
  padding: .65em .8em;
  text-align: left;
  vertical-align: top;
}
.ivory-glade-ops__table th {
  font-weight: 600;
  white-space: nowrap;
  width: 34%;
}

/* --- Partner logo strip ----------------------------------------------------
 * One <img> per partner (not one wide image), so flex-wrap lays out the rows. */
.ivory-glade-strip__list {
  display: flex;
  flex-wrap: wrap;
  gap: .9em 1.2em;
  list-style: none;
  margin: 0;
  padding: 0;
}
.ivory-glade-strip__item { margin: 0; }
.ivory-glade-strip__item img {
  height: auto;
  max-width: 160px;
  /* Partner logos come from many sources with different backgrounds; a light opacity evens them out
     without touching the image files. */
  opacity: .9;
}

/* --- Internal link mesh ----------------------------------------------------
 * OFF by default (site setting). The rules below apply only when it is switched on. */
.ivory-glade-mesh__intro { opacity: .8; }
.ivory-glade-mesh__list {
  display: flex;
  flex-direction: column;
  gap: .1em;
}
.ivory-glade-mesh__item {
  border-bottom: 1px solid rgba(127, 127, 127, .18);
}
.ivory-glade-mesh__item:last-child { border-bottom: 0; }
.ivory-glade-mesh__item .ux-menu-link__link {
  display: block;
  padding: .55em 0;
}

/* The tail sits in the same content column as the page-builder section above it. */
.ivory-glade-tail { margin-top: 1.5em; }

@media (min-width: 850px) {
  /* Three columns only on wide screens, through
     its own grid so it does not depend on the parent .large-4. */
  .ivory-glade-mesh__list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 1.6em;
  }
}

/* --- Game category cards (homepage) ------------------------
 * All colours come from tokens.css, so they follow the skin and mode of the site settings. */
.ivory-glade-games { margin: 8px 0 26px; }
.ivory-glade-games__title {
  font-family: var(--font-display); font-weight: 800; font-size: 1.15em; letter-spacing: .02em; text-transform: uppercase;
  color: var(--primary); padding-bottom: 10px; margin-bottom: 16px;
  border-bottom: 2px solid var(--line-strong);
}
.ivory-glade-games__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 850px) { .ivory-glade-games__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; } }
.ivory-glade-games__card {
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: 18px; border: 1px solid var(--card-border); background: var(--card-bg);
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.ivory-glade-games__card:hover {
  transform: translateY(-3px);
  border-color: var(--hero-border);
  box-shadow: var(--shadow), 0 0 0 1px var(--card-border);
}
.ivory-glade-games__media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface); }
.ivory-glade-games__img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 0 !important; }
.ivory-glade-games__label {
  display: block; margin: 10px; padding: 9px 8px; border-radius: 10px; text-align: center;
  font-family: var(--font-display); font-weight: 800; font-size: .95em; letter-spacing: .03em; text-transform: uppercase;
  color: var(--on-primary); background: linear-gradient(90deg, var(--primary), var(--secondary));
  box-shadow: 0 6px 18px var(--primary-glow);
}
.ivory-glade-games__all { text-align: center; margin-top: 18px; }

/* --- Footer columns --- */
.ivory-glade-foot {
  padding: 38px 0 26px;
  background: var(--footer-bg); color: var(--footer-muted);
  border-top: 1px solid var(--hero-border);
}
.ivory-glade-foot__grid { display: grid; grid-template-columns: 1fr; gap: 26px; }
@media (min-width: 850px) { .ivory-glade-foot__grid { grid-template-columns: 1.5fr repeat(3, 1fr); gap: 34px; } }
/* 4-column footer (games / account / services / policies) only when a 4th column exists; 3-column footers unchanged. */
@media (min-width: 850px) {
  .ivory-glade-foot__grid:has(> .ivory-glade-foot__col:nth-child(5)) { grid-template-columns: 1.2fr repeat(4, 1fr); gap: 26px; }
}
.ivory-glade-foot__logo img { width: 96px; height: auto; display: block; margin-bottom: 12px; }
.ivory-glade-foot__text { margin: 0; font-size: .92em; line-height: 1.65; color: var(--footer-muted); }
.ivory-glade-foot__title {
  margin-bottom: 10px; font-family: var(--font-display); font-weight: 800; letter-spacing: .03em; text-transform: uppercase;
  color: var(--primary);
}
.ivory-glade-foot__links { list-style: none; margin: 0; padding: 0; }
.ivory-glade-foot__links li { margin: 0; border-bottom: 1px dashed var(--line); }
.ivory-glade-foot__links a { position: relative; display: block; padding: 7px 0 7px 14px; font-size: .92em; color: var(--footer-text); }
.ivory-glade-foot__links a::before { content: "\203A"; position: absolute; left: 0; color: var(--primary); }
.ivory-glade-foot__links a:hover { color: var(--footer-link-hover); }

/* --- Floating CTA bar + vertical tab (assets/js/floaters.js) -------------------
 * Flowing gradient with a shine, full-width bottom bar on phones.
 * The gradient is built from --primary/--secondary, so it follows the skin. */
.ivory-glade-float {
  position: fixed; right: 24px; bottom: 24px; z-index: 60; display: flex; align-items: center; gap: 10px;
  opacity: 0; visibility: hidden; transform: translateY(16px); pointer-events: none;
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
}
.ivory-glade-float.is-visible { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; }
.ivory-glade-float__cta {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 12px;
  font-family: var(--font-display); font-weight: 800; font-size: .9rem; white-space: nowrap; text-decoration: none;
  color: var(--on-primary) !important;
  background: var(--primary); isolation: isolate;
  box-shadow: 0 8px 24px var(--primary-glow);
  transition: transform .2s ease, filter .2s ease;
}
/* Flowing gradient on the compositor (transform), not background-position: the old animation repainted the button on
   the main thread every frame (measured ~560 ms of main-thread work per page load). Two gradient tiles side by side,
   moved by one tile per cycle = the same look and speed as before, seamless. Not on the secondary button: the mobile
   dock uses its ::before as the icon. */
.ivory-glade-float__cta:not([data-variant="secondary"])::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 600%; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--primary), var(--secondary), var(--primary));
  animation: ivory-glade-flow 2s linear infinite; will-change: transform;
}
.ivory-glade-float__cta::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, .5), transparent);
  transform: translateX(-130%); animation: ivory-glade-shine 3.4s ease-in-out infinite;
}
.ivory-glade-float__cta[data-variant="secondary"] {
  animation: none;
  color: var(--primary) !important; background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--primary) 55%, transparent);
  box-shadow: var(--shadow-sm);
}
.ivory-glade-float__cta[data-variant="secondary"]::after { display: none; }
.ivory-glade-float__cta:hover { transform: translateY(-2px); filter: brightness(1.06); }
.ivory-glade-float__top {
  display: inline-grid; place-items: center; width: 46px; height: 46px; min-height: 46px; margin: 0; padding: 0;
  border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface-lift); color: var(--text);
  box-shadow: var(--shadow-sm); cursor: pointer;
}
.ivory-glade-float__top svg { width: 20px; height: 20px; }
.ivory-glade-float__top:hover { background: var(--primary); border-color: transparent; color: var(--on-primary); }
.ivory-glade-tabs { position: fixed; right: 0; bottom: 110px; z-index: 59; display: flex; flex-direction: column; gap: 12px; align-items: flex-end; }
.ivory-glade-tab {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  writing-mode: vertical-rl; transform: rotate(180deg);
  min-height: 132px; padding: 14px 9px; border-radius: 0 12px 12px 0;
  font-family: var(--font-display); font-weight: 800; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; text-decoration: none;
  color: var(--on-primary) !important;
  background: var(--primary); isolation: isolate;
  box-shadow: -4px 6px 18px var(--primary-glow);
}
.ivory-glade-tab::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 300%; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, var(--primary), var(--secondary), var(--primary));
  animation: ivory-glade-flow-v 4s ease-in-out infinite; will-change: transform;
}
.ivory-glade-tab::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .45), transparent);
  transform: translateY(-140%); animation: ivory-glade-shine-v 3.6s ease-in-out infinite;
}
.ivory-glade-tab:hover { filter: brightness(1.1); }
@keyframes ivory-glade-flow   { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@keyframes ivory-glade-shine  { 0% { transform: translateX(-130%); } 55%, 100% { transform: translateX(230%); } }
@keyframes ivory-glade-flow-v { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-66.6667%); } }
@keyframes ivory-glade-shine-v { 0% { transform: translateY(-140%); } 55%, 100% { transform: translateY(140%); } }
@media (max-width: 560px) {
  .ivory-glade-float { left: 12px; right: 12px; bottom: 14px; display: grid; grid-template-columns: 1fr 1fr 46px; }
  .ivory-glade-float__cta { width: 100%; padding: 0 10px; }
  body.ivory-glade-has-float { padding-bottom: 76px; }
  .ivory-glade-tabs { bottom: 96px; }
  .ivory-glade-tab { min-height: 96px; padding: 10px 7px; font-size: .62rem; }
}
/* Between phone and tablet widths the bar is a floating pill: keep the end of the page clear of it. */
@media (min-width: 561px) and (max-width: 849px) {
  body.ivory-glade-has-float { padding-bottom: 76px; }
}
/* Lane for the vertical tab: text never scrolls underneath it. Padding sits on the background-carrying wrappers, so
   backgrounds stay full width. The body class is set by floaters.js only when the tab is drawn. */
@media (max-width: 1279px) {
  body.ivory-glade-has-tabs #main, body.ivory-glade-has-tabs .ivory-glade-foot, body.ivory-glade-has-tabs .absolute-footer { padding-right: 28px; }
}
@media (max-width: 560px) {
  body.ivory-glade-has-tabs #main, body.ivory-glade-has-tabs .ivory-glade-foot, body.ivory-glade-has-tabs .absolute-footer { padding-right: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .ivory-glade-float__cta, .ivory-glade-float__cta::before, .ivory-glade-float__cta::after,
  .ivory-glade-tab, .ivory-glade-tab::before, .ivory-glade-tab::after { animation: none; }
}
