/*
  Light Theme Styles for ice-casino-polska.com
  - Systematic, component-based CSS with comments
  - Mobile-first, responsive
  - Accessibility-minded focus styles
*/

/* Root variables for easy theming */
:root {
  --color-bg: #ffffff;
  --color-surface: #f7f9fc;
  --color-text: #0f172a; /* slate-900 */
  --color-text-muted: #475569; /* slate-600 */
  --color-primary: #2563eb; /* blue-600 */
  --color-primary-contrast: #ffffff;
  --color-border: #e2e8f0; /* slate-200 */
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 6px 24px rgba(15, 23, 42, .1);
  --container: 1200px;
}

/* CSS Reset-ish and base elements */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; height: auto; display: block; }

/* Utility containers and flow */
.container { width: min(100% - 2rem, var(--container)); margin-inline: auto; }
.flow > * + * { margin-top: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap; }

/* Skip links */
.skip-links { position: absolute; inset: 0 0 auto; }
.skip-links__link { position: absolute; left: -9999px; background: #000; color: #fff; padding: .5rem .75rem; border-radius: .25rem; }
.skip-links__link:focus { left: .5rem; top: .5rem; z-index: 9999; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--color-bg); border-bottom: 1px solid var(--color-border); backdrop-filter: saturate(1.2) blur(6px); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .5rem 0; }
.site-header__logo img { display: block; height: 28px; width: auto; }

.primary-nav__list { display: flex; align-items: center; gap: .5rem; margin: 0; padding: 0; list-style: none; }

/* Make header buttons a bit more compact to reduce header height */
.site-header .btn { padding: .45rem .8rem; font-size: .95rem; }

@media (max-width: 639.98px) {
  .site-header__logo img { height: 24px; }
}

/* Mobile header: hide the bonus button, colorize login/register */
@media (max-width: 639.98px) {
  .primary-nav__list .btn.btn--primary { display: none; }
  .primary-nav__list .btn.btn--login { color: #fff; background: var(--color-primary); border-color: var(--color-primary); }
  .primary-nav__list .btn.btn--register { color: #064e3b; background: #bbf7d0; border-color: #86efac; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; text-decoration: none; border-radius: 999px; padding: .6rem 1rem; font-weight: 600; border: 1px solid transparent; transition: transform .06s ease, box-shadow .2s ease, background-color .2s ease; }
.btn:focus-visible { outline: 2px solid #000; outline-offset: 2px; }
.btn--link { color: var(--color-text); background: transparent; }
.btn--primary { color: var(--color-primary-contrast); background: var(--color-primary); box-shadow: var(--shadow-sm); }
.btn--primary:hover { filter: brightness(1.05); }
.btn--secondary { color: var(--color-primary); background: #dbeafe; border-color: #bfdbfe; }
.btn--lg { padding: .9rem 1.25rem; font-size: 1.05rem; }

/* Breadcrumbs */
.breadcrumbs { border-bottom: 1px dashed var(--color-border); background: var(--color-surface); }
.breadcrumbs__list { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 0; padding: .5rem 1rem; list-style: none; }
.breadcrumbs__item { color: var(--color-text-muted); }
.breadcrumbs__item a { color: inherit; text-decoration: none; }
.breadcrumbs__item[aria-current="page"] { color: var(--color-text); font-weight: 600; }

/* Hero */
.hero { position: relative; isolation: isolate; }
.hero__img { width: 100%; height: clamp(260px, 40vw, 560px); object-fit: cover; display: block; }
.hero__overlay { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(0deg, rgba(2,6,23,.55), rgba(2,6,23,.25)); }
.hero__content { text-align: center; color: #fff; padding: 1rem; background: rgba(30, 41, 59, .35); border: 1px solid rgba(255,255,255,.25); border-radius: var(--radius); box-shadow: var(--shadow-md); width: min(92%, 760px); }
.hero__title { margin: 0 0 .25rem; font-size: clamp(1.25rem, 3vw + .5rem, 2rem); }
.hero__subtitle { margin: 0 0 .75rem; color: #e2e8f0; }

/* Sections */
.section { padding: 2rem 0; }

/* Slots grid */
.slots-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin: 0; padding: 0; list-style: none; }
.slots-grid__item { aspect-ratio: 1 / 1; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: .75rem; padding: .75rem; display: grid; place-items: center; transition: transform .06s ease; }
.slots-grid__item:hover { transform: translateY(-2px); }
.slots-grid__item img { border-radius: .5rem; }

@media (min-width: 640px) {
  .slots-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 960px) {
  .slots-grid { grid-template-columns: repeat(6, 1fr); }
}

/* Mobile slots: show two full-width cards (each full viewport width) stacked */
@media (max-width: 639.98px) {
  .slots-grid { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
  .slots-grid__item { padding: 0; border-radius: 1rem; overflow: hidden; }
  .slots-grid__item a { display: block; width: 100%; }
  .slots-grid__item img { width: 100%; height: 100%; object-fit: cover; display: block; }
}

/* Content styles */
.content { padding: 2rem 0; }
.content h2, .content h3, .content h4 { line-height: 1.25; }
.content p { color: var(--color-text); }
.content ul, .content ol { padding-left: 1.25rem; }

/* Table responsive wrapper */
.table-responsive { width: 100%; overflow-x: auto; border: 1px solid var(--color-border); border-radius: .75rem; background: #fff; }
.table-responsive table { width: 100%; border-collapse: collapse; min-width: 560px; }
.table-responsive th, .table-responsive td { padding: .75rem .9rem; border-bottom: 1px solid var(--color-border); text-align: left; vertical-align: top; }
.table-responsive thead th { background: var(--color-surface); }

/* Mobile-first stacked table (enhanced by JS via data-label on td) */
@media (max-width: 639.98px) {
  .table-responsive table { min-width: 0; }
  .table-responsive thead { display: none; }
  .table-responsive tbody tr { display: grid; grid-template-columns: 1fr; gap: .5rem; padding: .75rem; border-bottom: 1px solid var(--color-border); }
  /* Consistent mobile card look */
  .table-responsive tbody tr:last-child { border-bottom: none; }

  /* Two patterns: tables with row headers (th[scope=row]) and normal td rows */
  .table-responsive.table--row-headers tbody tr > th[scope="row"] {
    display: block;
    padding: 0;
    margin: 0;
    font-size: 1rem;
    line-height: 1.35;
  }
  .table-responsive.table--row-headers tbody tr > td {
    display: block;
    padding: 0;
    margin: 0;
    color: var(--color-text);
  }
  .table-responsive.table--row-headers tbody tr > td::before { content: none; }

  /* For purely columnar tables (no row headers), show label on all cells */
  .table-responsive:not(.table--row-headers) tbody tr > td {
    display: grid;
    grid-template-columns: 12ch 1fr;
    gap: .5rem;
    padding: .5rem .25rem;
    border: none;
  }
  .table-responsive:not(.table--row-headers) tbody tr > td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--color-text-muted);
  }
}

/* Footer */
.site-footer { margin-top: 2rem; background: var(--color-surface); border-top: 1px solid var(--color-border); }
.site-footer__inner { display: grid; gap: 1rem; grid-template-columns: 1fr; padding: 1.5rem 0; }
.site-footer__title { margin: 0 0 .5rem; font-weight: 700; }
.pay-logos, .footer-nav { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: .5rem .75rem; }
.site-footer__bottom { border-top: 1px solid var(--color-border); padding: .75rem 0; color: var(--color-text-muted); }

@media (min-width: 960px) {
  .site-footer__inner { grid-template-columns: 2fr 1fr 1fr; }
}

/* Focus styles */
:where(a, button, summary, [tabindex]) { outline-offset: 2px; }
:where(a, button):focus-visible { outline: 2px solid #111827; }

/* Prevent iOS rubber-band scroll inside the page to simulate lock when modal overlays exist */
html.is-locked, body.is-locked { height: 100%; overflow: hidden; }
