/*
Theme Name: LottoPCSO Homepage System
Theme URI: https://lottopcso.net/
Author: Muhammad Imran
Description: Lottery results theme with Classic Editor metabox builder (no plugin)
Version: 1.3.0
Text Domain: lottopcso-layout
*/

:root{
  --bg:#ffffff;
  --text:#111827;
  --muted:#6b7280;
  --border:#e5e7eb;
  --surface:#f8fafc;

  --accent:#b91c1c;
  --accent-2:#0f172a;

  --container:900px; /* 🔥 MORE COMPACT */
  --radius:12px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial;
}

*{ box-sizing:border-box; }
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:var(--font);
  line-height:1.5;
}

.container{
  max-width:var(--container);
  margin:0 auto;
  padding:0 12px;
}

/* ================= HEADER ================= */

.site-header{
  background:#fff;
  border-bottom:1px solid var(--border);
}

.brand{
  padding:14px 0 10px;
}
.brand__title{
  font-size:24px;
  font-weight:900;
}
.brand__title a{
  text-decoration:none;
  color:var(--accent-2);
}
.brand__tagline{
  font-size:13px;
  color:var(--muted);
}

/* ================= NAVBAR ================= */

.navbar{
  background:var(--accent);
}

.nav-toggle{ display:none !important; } /* ❌ kill menu button */

.primary-nav{
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}

.primary-nav ul{
  display:flex;
  flex-wrap:nowrap;
  gap:16px;
  padding:10px 6px;
  margin:0;
  list-style:none;
}

.primary-nav li{ white-space:nowrap; }

.primary-nav a{
  color:#fff;
  font-weight:900;
  font-size:12px;
  letter-spacing:.6px;
  text-transform:uppercase;
  text-decoration:none;
  padding:6px 2px;
}

.primary-nav a:hover,
.primary-nav .current-menu-item > a{
  text-decoration:underline;
}

/* ================= MAIN ================= */

main.site-main{
  padding:14px 0 28px;
}

/* ================= CARDS ================= */

.card{
  background:#fff;
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:12px;            /* 🔥 tighter */
  margin-bottom:12px;
}

.page-title{
  font-size:24px;
  font-weight:900;
  margin-bottom:6px;
}

.card__meta{
  font-size:12px;
  color:var(--muted);
}

/* ================= DATE FILTER ================= */

.date-filter{
  display:flex;
  gap:8px;
  align-items:end;
}

.date-filter label{
  font-size:11px;
  font-weight:900;
  text-transform:uppercase;
}

.date-filter input{
  padding:7px 8px;
  border-radius:8px;
  border:1px solid var(--border);
  font-weight:800;
}

.date-filter button{
  padding:7px 10px;
  border-radius:8px;
  border:0;
  background:var(--accent);
  color:#fff;
  font-weight:900;
  cursor:pointer;
}

/* ================= LOTTERY RESULT CARD ================= */

.pcso-cards{
  display:flex;
  justify-content:center;
}

.pcso-card{
  width:100%;
  max-width:460px; /* 🔥 more compact */
  border:1px solid var(--border);
  border-radius:12px;
  overflow:hidden;
}

.pcso-card__head{
  background:#fde8e8;
  padding:8px 10px;
  display:flex;
  justify-content:space-between;
  font-weight:900;
  font-size:13px;
}

.pcso-card__rows{
  padding:10px;
}

/* Result rows */
.pcso-line{
  display:flex;
  justify-content:space-between;
  align-items:center;
  background:#f5f6f8;
  padding:7px 9px;
  border-radius:8px;
  margin-bottom:6px;
}

.pcso-line__left{
  font-size:11px;
  font-weight:800;
  color:#6b7280;
  text-transform:uppercase;
}

.pcso-line__right{
  font-size:17px;
  font-weight:900;
  color:var(--accent);
  letter-spacing:1px;
}

/* ================= TABLES ================= */

.table-wrap{
  border:1px solid var(--border);
  border-radius:12px;
  overflow:auto;
}

.table-wrap table{
  width:100%;
  border-collapse:collapse;
  font-size:13px;
}

.table-wrap th,
.table-wrap td{
  padding:8px 10px;
  border-bottom:1px solid var(--border);
}

.table-wrap th{
  background:#f8fafc;
  font-weight:900;
}

/* ================= FOOTER ================= */

.site-footer{
  border-top:1px solid var(--border);
  padding:14px 0;
  font-size:13px;
  color:var(--muted);
}

/* ================= MOBILE ================= */

@media (max-width:768px){

  .container{ max-width:100%; }

  .pcso-card{
    max-width:100%;
  }

  .pcso-line__right{
    font-size:15px;
  }
}

/* =====================================================
   FINAL HARD FIX — CENTER EACH LOTTERY RESULT CARD
===================================================== */

/* Wrapper that holds result cards */
.home .pcso-cards {
  display: flex;
  justify-content: center;
  width: 100%;
}

/* The actual pink/white result card */
.home .pcso-card {
  max-width: 520px;
  width: 100%;
  margin: 0 auto;     /* 🔥 force center */
}

/* Ensure rows inside card don't push layout */
.home .pcso-card__rows {
  width: 100%;
}

/* Mobile safety */
@media (max-width: 768px) {
  .home .pcso-cards {
    display: block;
  }
  .home .pcso-card {
    max-width: 100%;
  }
}

/* =====================================================
   MOBILE MENU — HORIZONTAL SCROLL + CLICKABLE ARROW
===================================================== */
@media (max-width: 768px) {

  .navbar {
    position: relative;
  }

  .primary-nav {
    position: relative;
    overflow: hidden;
  }

  .primary-nav ul {
    display: flex;
    flex-wrap: nowrap;
    gap: 14px;
    overflow-x: auto;
    white-space: nowrap;
    padding: 10px 48px 10px 12px; /* SPACE for arrow */
    scroll-behavior: smooth;
  }

  .primary-nav ul::-webkit-scrollbar {
    display: none;
  }

  /* CLICKABLE ARROW BUTTON */
  .menu-scroll-arrow {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 44px;
    background: linear-gradient(
      to left,
      rgba(185,28,28,1),
      rgba(185,28,28,.85),
      rgba(185,28,28,0)
    );
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 900;
    color: #fff;
    cursor: pointer;
    z-index: 9;
    box-shadow: -8px 0 12px rgba(0,0,0,.25);
  }

  .menu-scroll-arrow span {
    pointer-events: none;
  }

  /* Ensure menu links NEVER sit under arrow */
  .primary-nav a {
    position: relative;
    z-index: 1;
  }
}

.pcso-schedule-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid #e5e7eb;
}

.pcso-schedule-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pcso-lottery-name {
    font-size: 15px;
    font-weight: 600;
}

.pcso-lottery-name a {
    color: #111827;
    text-decoration: none;
}

.pcso-lottery-name a:hover {
    text-decoration: underline;
}

.pcso-schedule-right {
    font-size: 13px;
    color: #6b7280;
    white-space: nowrap;
}

/* Info icon */
.pcso-info {
    font-size: 14px;
    cursor: pointer;
    color: #2563eb;
    position: relative;
}

/* Tooltip */
.pcso-info:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: #111827;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 10;
}

/* ===============================
   LOTTO SCHEDULE – MOBILE OVERRIDES
   (Do NOT remove old CSS)
================================ */

.pcso-schedule-item {
    max-width: 100%;
    box-sizing: border-box;
}

.pcso-schedule-right {
    white-space: normal !important;
    word-break: break-word;
}

@media (max-width: 640px) {
    .pcso-schedule-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .pcso-schedule-right {
        width: 100%;
        text-align: left;
    }
}

.pcso-card__footer {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #e5e7eb;
  font-size: 14px;
  color: #374151;
}

/* Center category archive content */
.category .site-main,
.archive .site-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px;
}

.archive-header {
  text-align: center;
  margin-bottom: 32px;
}

