/*
 * tokyomegapools / layout.css
 * Self-contained stylesheet for the Tokyo Mega Pools skin.
 *
 * Section A — a minimal Bootstrap-4 subset (only the classes the ported pages
 *   actually use: navbar, container/-fluid, the 12-col grid, tables, modal,
 *   buttons, and the spacing/display utilities). The live site pulled full
 *   Bootstrap out of a 2.2 MB Meteor bundle; we vendor just the used rules so
 *   the skin has zero runtime framework dependency.
 * Section B — the brand rules extracted VERBATIM from the live host-scoped CSS
 *   (docs/recon/extracts/tokyomegapools/desktop/assets/5358f52cb744103e.css,
 *   selectors under `.css-CK3piLfcKaatCTzox`). Colors, gradients, digit sizes
 *   are copied 1:1; only the two relative background-image url()s are rewritten
 *   to absolute /assets paths so they resolve on every route.
 *
 * Palette (from live): dark-red gradient #6d0019 -> #8f0222 56% -> #a90329.
 */

/* ============================================================== *
 * SECTION A — Bootstrap 4 subset (only the used classes)
 * ============================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  text-align: left;
}
h1, h2, h3, h4, h5, h6 { margin-top: 0; margin-bottom: .5rem; font-weight: 500; line-height: 1.2; }
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }
p { margin-top: 0; margin-bottom: 1rem; }
a { color: #007bff; text-decoration: none; background-color: transparent; }
a:hover { color: #0056b3; text-decoration: underline; }
img { vertical-align: middle; border-style: none; }

/* Layout containers */
.container {
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
}
@media (min-width: 576px)  { .container { max-width: 540px; } }
@media (min-width: 768px)  { .container { max-width: 720px; } }
@media (min-width: 992px)  { .container { max-width: 960px; } }
@media (min-width: 1200px) { .container { max-width: 1140px; } }
.container-fluid { width: 100%; padding-right: 15px; padding-left: 15px; margin-right: auto; margin-left: auto; }

/* Grid */
.row { display: flex; flex-wrap: wrap; margin-right: -15px; margin-left: -15px; }
.col-3, .col-6, .col-7, .col-12, .col-lg-3, .col-md-6 {
  position: relative; width: 100%; padding-right: 15px; padding-left: 15px;
}
.col-3  { flex: 0 0 25%;      max-width: 25%; }
.col-6  { flex: 0 0 50%;      max-width: 50%; }
.col-7  { flex: 0 0 58.3333%; max-width: 58.3333%; }
.col-12 { flex: 0 0 100%;     max-width: 100%; }
@media (min-width: 768px) { .col-md-6 { flex: 0 0 50%; max-width: 50%; } }
@media (min-width: 992px) { .col-lg-3 { flex: 0 0 25%; max-width: 25%; } }

/* Navbar */
.navbar {
  position: relative; display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between;
  padding: .5rem 1rem;
}
.navbar-nav {
  display: flex; flex-direction: column;
  padding-left: 0; margin-bottom: 0; list-style: none;
}
.navbar-brand { display: inline-block; padding-top: .3125rem; padding-bottom: .3125rem; margin-right: 1rem; line-height: inherit; white-space: nowrap; }
.nav-item { display: block; }
.nav-link { display: block; padding: .5rem 1rem; }
.navbar-toggler {
  padding: .25rem .75rem; font-size: 1.25rem; line-height: 1;
  background-color: transparent; border: 1px solid transparent; border-radius: .25rem; cursor: pointer;
}
.navbar-toggler-icon {
  display: inline-block; width: 1.5em; height: 1.5em; vertical-align: middle;
  content: ""; background: no-repeat center center; background-size: 100% 100%;
}
.navbar-dark .navbar-toggler { color: rgba(255,255,255,.5); border-color: rgba(255,255,255,.1); }
.navbar-dark .navbar-toggler-icon {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(255,255,255,0.5)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}
.collapse:not(.show) { display: none; }
@media (min-width: 992px) {
  .navbar-expand-lg { flex-flow: row nowrap; justify-content: flex-start; }
  .navbar-expand-lg .navbar-nav { flex-direction: row; }
  .navbar-expand-lg .navbar-nav .nav-link { padding-right: .5rem; padding-left: .5rem; }
  .navbar-expand-lg .navbar-toggler { display: none; }
  .navbar-expand-lg .navbar-collapse { display: flex !important; flex-basis: auto; }
}

/* Buttons */
.btn {
  display: inline-block; font-weight: 400; text-align: center; white-space: nowrap;
  vertical-align: middle; user-select: none; border: 1px solid transparent;
  padding: .375rem .75rem; font-size: 1rem; line-height: 1.5; border-radius: .25rem;
  cursor: pointer; text-decoration: none;
}
.btn-sm { padding: .25rem .5rem; font-size: .875rem; line-height: 1.5; border-radius: .2rem; }
.btn-danger { color: #fff; background-color: #dc3545; border-color: #dc3545; }
.btn-danger:hover { color: #fff; background-color: #c82333; border-color: #bd2130; }
.btn-link { font-weight: 400; color: #007bff; text-decoration: none; }
.btn-link:hover { color: #0056b3; text-decoration: underline; }

/* Tables */
.table { width: 100%; margin-bottom: 1rem; color: inherit; border-collapse: collapse; }
.table th, .table td { padding: .75rem; vertical-align: top; border-top: 1px solid rgba(255,255,255,.15); }
.table thead th { vertical-align: bottom; border-bottom: 2px solid rgba(255,255,255,.15); }

/* Cards */
.card {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  word-wrap: break-word; background-clip: border-box;
  border: 1px solid rgba(0,0,0,.125); border-radius: .25rem;
}
.card-body { flex: 1 1 auto; padding: 1.25rem; }

/* Modal (Bootstrap-4 markup preserved; opens via inline JS below) */
.modal {
  position: fixed; top: 0; left: 0; z-index: 1050; display: none;
  width: 100%; height: 100%; overflow: hidden; outline: 0;
}
.modal.fade .modal-dialog { transition: transform .3s ease-out; transform: translate(0,-50px); }
.modal.show { display: block; }
.modal.show .modal-dialog { transform: none; }
.modal-open { overflow: hidden; }
.modal-backdrop { position: fixed; top: 0; left: 0; z-index: 1040; width: 100vw; height: 100vh; background-color: #000; opacity: .5; }
.modal-dialog { position: relative; width: auto; margin: 1.75rem auto; pointer-events: none; max-width: 500px; }
.modal-lg { max-width: 800px; }
.modal-content {
  position: relative; display: flex; flex-direction: column; width: 100%;
  pointer-events: auto; background-color: #fff; background-clip: padding-box;
  border: 1px solid rgba(0,0,0,.2); border-radius: .3rem; outline: 0;
}
.modal-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 1rem; border-bottom: 1px solid #dee2e6;
  border-top-left-radius: .3rem; border-top-right-radius: .3rem;
}
.modal-title { margin-bottom: 0; line-height: 1.5; }
.modal-body { position: relative; flex: 1 1 auto; padding: 1rem; }
.close {
  float: right; font-size: 1.5rem; font-weight: 700; line-height: 1;
  color: #000; text-shadow: 0 1px 0 #fff; opacity: .5;
  background: transparent; border: 0; cursor: pointer;
}
.close:hover { opacity: .75; }

/* Utilities — spacing */
.p-1 { padding: .25rem !important; }
.p-2 { padding: .5rem  !important; }
.p-3 { padding: 1rem   !important; }
.pt-3 { padding-top: 1rem !important; }
.pt-5 { padding-top: 3rem !important; }
.py-2 { padding-top: .5rem !important; padding-bottom: .5rem !important; }
.py-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.py-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
.mb-2 { margin-bottom: .5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mt-2 { margin-top: .5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-5 { margin-top: 3rem !important; }
.my-1 { margin-top: .25rem !important; margin-bottom: .25rem !important; }
.my-2 { margin-top: .5rem !important; margin-bottom: .5rem !important; }
.my-3 { margin-top: 1rem !important; margin-bottom: 1rem !important; }
.ml-auto { margin-left: auto !important; }

/* Utilities — display / flex / text */
.d-none  { display: none !important; }
.d-block { display: block !important; }
.align-items-center { align-items: center !important; }
.justify-content-end { justify-content: flex-end !important; }
.text-center { text-align: center !important; }
.text-right  { text-align: right !important; }
.text-warning { color: #ffc107 !important; }
.img-fluid { max-width: 100%; height: auto; }
.small { font-size: 80%; font-weight: 400; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
@media (min-width: 576px) {
  .d-sm-none  { display: none !important; }
  .d-sm-block { display: block !important; }
}

/* ============================================================== *
 * SECTION B — Tokyo Mega Pools brand rules (verbatim from live,
 *   selectors under `.css-CK3piLfcKaatCTzox`; only relative bg
 *   url()s rewritten to absolute /assets paths).
 * ============================================================== */

.css-CK3piLfcKaatCTzox { background-color: #a90329; }

.css-CK3piLfcKaatCTzox .container-header {
  background: #6d0019;
  background: linear-gradient(180deg, #6d0019 0, #8f0222 56%, #a90329);
  color: #fff;
  border-bottom: 2px solid #fff;
  /* live: url(8451fc28f2fe32e8.png) — rewritten to absolute */
  background: url(/assets/templates/tokyomegapools/assets/8451fc28f2fe32e8.png);
  background-size: contain;
  background-repeat: no-repeat;
  background-position-x: right;
}
.css-CK3piLfcKaatCTzox .container-header .navbar { padding: 0; }
.css-CK3piLfcKaatCTzox .container-header .navbar a.nav-link { color: #fff; }
.css-CK3piLfcKaatCTzox .container-header .navbar a.nav-link.active {
  font-weight: 700; color: red; border-bottom: 3px solid red;
}
.css-CK3piLfcKaatCTzox .container-header .navbar a.nav-link:hover { color: red; }

.css-CK3piLfcKaatCTzox .container-body {
  /* live: url(5255bcf93c90daf4.jpg) — rewritten to absolute */
  background: url(/assets/templates/tokyomegapools/assets/5255bcf93c90daf4.jpg);
  background-size: cover;
  background-repeat: no-repeat;
  background-position-x: center;
  background-attachment: fixed;
}
.css-CK3piLfcKaatCTzox .container-body .container { padding-top: 31px; padding-bottom: 31px; }
.css-CK3piLfcKaatCTzox .container-body .container-home {
  background: #6d0019;
  background: linear-gradient(180deg, #6d0019 0, #8f0222 56%, #a90329);
  color: #fff;
}
.css-CK3piLfcKaatCTzox .container-body .container-home hr { border-top: 1px solid #fff; }

/* Home hero big digits (desktop) */
.css-CK3piLfcKaatCTzox .container-body .container-home .result-digits span {
  background: #6d0019;
  background: linear-gradient(180deg, #6d0019 0, #8f0222 56%, #a90329);
  width: 80px; height: 80px; border-radius: 80px; font-size: 56px;
  border: 2px solid #6d0019; margin: 8px; display: inline-block;
}
.css-CK3piLfcKaatCTzox .container-body .container-home .result-digits-sm span {
  width: 50px; height: 50px; border-radius: 50px; font-size: 34px;
  border: 2px solid red; margin: 4px; display: inline-block;
}

.css-CK3piLfcKaatCTzox .container-body .container-content { background-color: rgba(0,0,0,.75); color: #fff; }
.css-CK3piLfcKaatCTzox .container-body .container-content .card { background-color: rgba(0,0,0,.25); }
/* Result page uses `.container-content` at the top level (no .container-body ancestor
   on the live sub-page markup) — mirror the same look so the result table panel
   matches the home content panel. */
.css-CK3piLfcKaatCTzox .container-content { background-color: rgba(0,0,0,.75); color: #fff; }
.css-CK3piLfcKaatCTzox .container-content .result-digits span {
  background: #6d0019;
  background: linear-gradient(180deg, #6d0019 0, #8f0222 56%, #a90329);
  width: 80px; height: 80px; border-radius: 80px; font-size: 56px;
  border: 2px solid #6d0019; margin: 8px; display: inline-block;
}
.css-CK3piLfcKaatCTzox .container-content .result-digits-sm span {
  width: 50px; height: 50px; border-radius: 50px; font-size: 34px;
  border: 2px solid red; margin: 4px; display: inline-block;
}

.css-CK3piLfcKaatCTzox .container-footer {
  background: #6d0019;
  background: linear-gradient(180deg, #6d0019 0, #8f0222 56%, #a90329);
  color: #fff; border-top: 2px solid #fff;
}

.css-CK3piLfcKaatCTzox .table-striped tbody tr:nth-of-type(odd) { background-color: rgba(0,0,0,.1); }
.css-CK3piLfcKaatCTzox .table td, .css-CK3piLfcKaatCTzox .table th { padding: .5rem .25rem; }

.css-CK3piLfcKaatCTzox #modal-live-draw .modal-content {
  color: #000; border: 2px solid #fff; border-color: hsla(0,0%,100%,.5); border-radius: 8px;
  background: #6d0019;
  background: linear-gradient(180deg, #6d0019 0, #8f0222 56%, #a90329);
}
.css-CK3piLfcKaatCTzox .btn { cursor: pointer; }
.css-CK3piLfcKaatCTzox .container-opaque { background-color: rgba(0,0,0,.75); color: #fff; }

/* Yellow lottery balls (result table) */
.css-CK3piLfcKaatCTzox .ball-number {
  color: #000; border: 1px solid #ccc; display: inline-block; text-align: center;
  width: 36px; height: 36px; border-radius: 18px; font-size: 22px;
  background: #f1e767;
  background: linear-gradient(180deg, #f1e767 0, #feb645);
}

/* Vertically center the digit glyph inside every circle/ball.
   The live site relies on Bootstrap's line-height + the Meteor reset; with our
   subset we set an explicit line-height equal to each element's height so the
   number sits centered (source renders single digits, so this is exact). */
.css-CK3piLfcKaatCTzox .result-digits span { line-height: 80px; }
.css-CK3piLfcKaatCTzox .result-digits-sm span { line-height: 50px; }
.css-CK3piLfcKaatCTzox .ball-number { line-height: 34px; }

/* ============================================================== *
 * SECTION C — Responsive digit sizes (mirrors the live @media
 *   overrides that shrink the hero/detail circles on narrow screens).
 * ============================================================== */
@media (max-width: 767.98px) {
  .css-CK3piLfcKaatCTzox .container-body .container-home .result-digits span,
  .css-CK3piLfcKaatCTzox .container-content .result-digits span {
    width: 38px; height: 38px; border-radius: 38px; font-size: 28px;
    border: 2px solid red; margin: 4px; line-height: 38px;
  }
  .css-CK3piLfcKaatCTzox .container-body .container-home .result-digits-sm span,
  .css-CK3piLfcKaatCTzox .container-content .result-digits-sm span {
    width: 36px; height: 36px; border-radius: 36px; font-size: 26px;
    border: 2px solid red; margin: 4px; line-height: 36px;
  }
}
