/*
Theme Name: Lotto
Description: This is a child theme for Flatsome Theme
Author: UX Themes
Template: flatsome
Version: 3.0
*/

/*************** ADD CUSTOM CSS HERE.   ***************/

:root {
  --color-primary: #00269f;
  --color-text: #021e7c;
  --color-accent: #d0b13e;
  --color-bg: #d9d9d9; 
 --lotto-bg: #330005;          /* พื้นการ์ด */
  --lotto-card: linear-gradient(180deg, #830a1679, #830a16b6);       /* พื้นกล่องย่อย */
  --lotto-border: #470108;      /* เส้นแบ่งอ่อน */
  --lotto-primary: #ffffff;     /* สีเลขหลัก */
  --lotto-text: #dfdfdf;
  --lotto-muted: #dfdfdf;       /* แท็บวันที่ */
}

.-nmg p{
  margin-bottom: 0 !important;
}


body.boxed{
    max-width: 430px !important;
}

.header-button-1,.header-button-2{
     margin: 0 !important;
}

.header-button a {
    font-weight: 500;
    font-size: 16px;
   
}

.header-button-2 a{
    background: linear-gradient(70deg, #ffb531, #fffe52 50%, #ffb41b);
    box-shadow: 0 0 10px #26262380 !important;
    color: #000;
    font-size: 12px;
}

.header-button-2 a:hover{
    color: #000;
}

.col{
    padding-left: 8px !important;
    padding-right: 8px !important;
}


/* Scroll Lotto Marquee (continuous loop version) */

.scroll-marquee {
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  width: 100%;
  padding: 8px 0;
}

.scroll-track {
  display: inline-block;
  white-space: nowrap;
  animation: scroll-loop 25s linear infinite;
}

.scroll-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0 2px;
  text-decoration: none;
  color: #000;
  border-radius: 6px;
  padding: 5px 8px;
  font-weight: 500;
  transition: background .3s, color .3s;
  background: var(--color-primary);
}

.scroll-item span{
  background: var(--color-bg);
  font-size: 12px;
  border-radius: 4px;
  padding: 2px 8px;
}

.scroll-flag {
  width: 30px;
  height: auto;
  border-radius: 4px;
  border: solid 2px #fff;
}

@keyframes scroll-loop {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* หยุดเมื่อ hover */
.scroll-marquee:hover .scroll-track {
  animation-play-state: paused;
}

/* Scroll Lotto Marquee end */

/* ป้ายข้อความวิ่งต่อเนื่อง */
.scroll-marquee-text {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  border-radius: 8px;
  background: #000;
  color: #fff;
  padding: 0px 6px;
}



/* ส่วนของข้อความเลื่อน */
.scroll-viewport-text {
  position: relative;
  flex: 1;
  overflow: hidden;
}

.scroll-track-text {
  display: inline-block;
  white-space: nowrap;
  will-change: transform;
  animation: scroll-loop 7s linear infinite;
}

.scroll-text {
  display: inline-block;
  margin-right: 50px;
  font-size: 10px;
  font-weight: 500;
  color: #fff;
  background: linear-gradient(180deg, #f3f3d4 20%, #d7ad5e);
  -webkit-text-fill-color: transparent;
  -webkit-background-clip: text;
}



/* เอฟเฟกต์เลื่อนต่อเนื่อง */
@keyframes scroll-loop {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}


.top-banner img {
    border-radius: 6px;
}


.text-title {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    font-weight: 500;
  
}

.text-title p{
    margin-bottom: 10px;
}

.text-title a{
  color:#9ca3af;
  font-size: 12px;
}

.game_all .swiper-slide img{
 border-radius: 10px;
 width: 100%;
}

.tv_online,.ball_online {
  padding: 6px 2px;
}


.tv_online .swiper-slide  img{
 padding: 6px;
 border-radius: 10px;
 box-shadow: 0 0 6px #00000015;
 background: #fff;
 width: 100%;
}

.ball_online .swiper-slide  img{
 border-radius: 10px;
 box-shadow: 0 0 6px #0000002f;
 width: 100%;
}

.promotion-group{
  background: #e5e5e5;
  border-radius: 10px;
  padding: 8px;
}

.promotion-group img{
  border-radius: 8px;
}

.promotion-group .group-detail {
    display: grid;
    grid-template-columns: 65% 1fr;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
    align-items: center;
}

.promotion-group .promo-title {
    display: block;
    color: #000;
    font-size: 12px;
    margin: auto 0;
    background: #fff;
    padding: 8px;
    border-radius: 10px;
    font-weight: 500;
}

.promo-btn{
  margin: 0 auto;
  padding: 0;
  width: 100%;
}

button#promo_popup_open {
    display: none;
}

.waviy {
    background: linear-gradient(70deg, rgb(255, 181, 49) 0%, rgb(255, 254, 82) 50%, rgb(255, 180, 27) 100%);
    text-align: center;
    border-radius: 10px;
    padding: 10px 2px !important;
    display: inline-flex;
    width: 100%;
    justify-content: center;
}

.waviy span {
  animation: waviy 1s infinite;
  animation-delay: calc(.05s * var(--i));
  color: #000;
  display: inline-block;
  font-weight: 700;
  position: relative;
  font-size: 15px;
  padding: 0 2px;
  display: inline-flex;
  justify-content: center;
  line-height: 1;

}


@keyframes waviy {
  0%,40%,100% {
    transform: translateY(0);
  }
  20% {
    transform: translateY(-6px);
  }
}


/**Lotto**/

.thai-lottery-card {
  background: var(--lotto-bg);
  border-radius: 16px;
  padding: 18px;
  box-shadow:
    0 1px 0 rgba(0,0,0,.03),
    0 6px 24px rgba(14, 23, 38, .06);
  color: var(--lotto-text);
  position: relative;
  overflow: hidden;
}

/* หัวการ์ด */
.thai-lottery-title{
  display:flex; align-items:center; gap:10px;
  font-size: clamp(16px, 2.3vw, 24px);
  font-weight: 500; margin: 0 0 10px;
  color: #ffffff !important;
}
.thai-lottery-title::before{
  content: url(/wp-content/uploads/2025/10/th-o.png) ;
  border: solid 2px #d0b13e;
  border-radius: 50%;
  line-height: 0;
}
.thai-lottery-draw-date{
  position:absolute; top:20px; right:20px;
  background: linear-gradient(70deg, rgb(255, 181, 49) 0%, rgb(255, 254, 82) 50%, rgb(255, 180, 27) 100%);
  color:#000000; font-weight:700;
  font-size: 16px; line-height: 1;
  padding: 8px 12px; border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
}

/* รางวัลที่ 1 (กล่องใหญ่) */
.thai-lottery-primary-prize-section{
  background: var(--lotto-card);
  border: 1px solid var(--lotto-border);
  border-radius: 12px;
  padding: clamp(4px, 3vw, 8px);
  text-align: center;
  margin-bottom: 14px;
}
.thai-lottery-primary-number{
   background: linear-gradient(180deg, #f3f3d4 20%, #d7ad5e);
  -webkit-text-fill-color: transparent;
  -webkit-background-clip: text;
  font-weight: 700;
  font-size: clamp(54px, 8vw, 64px);
  letter-spacing: 1px;
  line-height: 1.05;
}
.thai-lottery-label{
  margin-top: 6px;
  font-size: 18px;
  color: var(--lotto-muted);
  font-weight: 500;
}

/* กล่องย่อย 3 ตัวหน้า/ท้าย + 2 ตัวล่าง เป็นกริด 2 คอลัมน์ */
.thai-lottery-sub-prizes{
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 14px;
  margin-bottom: 14px;
}

/* กล่องย่อย */
.thai-lottery-sub-prize{
  background: var(--lotto-card);
  border: 1px solid var(--lotto-border);
  border-radius: 12px;
  padding: 8px;
  display: grid;
  align-content: center;
  text-align: center;
  min-height: 74px;
}
.thai-lottery-sub-prize .thai-lottery-num{
  color: var(--lotto-primary);
  font-weight: 700;
  font-size: clamp(34px, 4.2vw, 40px);
  line-height: 1.1;
}

/* label ข้างล่างตัวเลขของกล่องย่อย */
.thai-lottery-sub-prize .thai-lottery-label{
  margin-top: 4px;
  font-size: 18px;
  color: var(--lotto-muted);
  font-weight: 500;
}


.absolute-footer {
    display: none;
}


ul.mobile-nav.nav.nav-right {
    min-width: 250px;
}

.wpcb-lotto-today__header {
    background-color: #00269f;
    flex-wrap: nowrap;
    border-radius: 4px;
    text-align: center;
}

.wpcb-lotto-today__header-title {
    font-size: 18px;
}

.wpcb-lotto-today__grid, .wpcb-lotto-today__content {
    padding: .5rem 0;
}

.wpcb-lotto-today__card-header {
    background-color: #000233;
    font-size: 14px;
}

.wpcb-lotto-today__card-body {
    font-size: 16px;
}

.wpcb-lotto-today__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.wpcb-lotto-today__grid-item-title {
    font-size: 14px;
}

.wpcb-lotto-today__grid-item-header {
    background-color: #01134d;
    text-align: center;
}

/**Popup**/
.popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 999;
}

.popup-box {
    display: none;
    position: fixed;
    bottom: 0%;
    left: 50%;
    transform: translateX(-50%) translateY(30px); /* เริ่มต่ำลงเล็กน้อย */
    padding: 25px;
    z-index: 1000;
    text-align: center;
    width: 100%;
    max-width: 360px;
    animation: popupFadeUp 0.8s ease forwards;
}

@keyframes popupFadeUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}
.popup-image {
    width: 100%;
        filter: drop-shadow(1px 1px 15px rgba(0, 128, 255, 0.5));
       
}

.popup-buttons {
    display: flex;
    column-gap: 5px;
    flex-wrap: nowrap;
    z-index: 99;
    position: relative;
    margin-top: -20px;
}

.popup-buttons a {
    display: block;
    padding: 8px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    color: #fff;
    width: 48%;
    border: solid 2px #fff;
}

.btn-register { 
  background: linear-gradient(180deg,rgba(0, 38, 159, 1) 0%, rgb(0, 20, 83) 100%);
}
.btn-login { 
  background: linear-gradient(70deg, #ffb531, #fffe52 50%, #ffb41b); 
  color: #000 !important;
 }

.popup-trigger {
    padding: 2px 16px;
    border-radius: 50px;
    color: #000000;
    cursor: pointer;
    background: linear-gradient(70deg, #ffb531, #fffe52 50%, #ffb41b);
    box-shadow: 0 0 10px #2626233b ;
    margin-right: 0;
}

.auto-ft a{
  color: #ffdd39;;
}


button#popup_footer_open {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 0);
    z-index: 5;
    margin-bottom: 5px;
    max-width: 330px;
    display: block;
    width: 100%;
    box-shadow: 0 0 10px rgb(0 0 0 / 60%);
}



@media only screen and (max-width: 48em) {
/*************** ADD MOBILE ONLY CSS HERE  ***************/

.wpcb-lotto-today__grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
}

.wpcb-lotto-today__grid-item-header {
    flex-wrap: nowrap;
}




}