/* OKSY3 Popup PRO */
.oksy3-modal-backdrop{
  background:rgba(15,23,42,.62)!important;
  backdrop-filter:blur(8px);
}

.oksy3-modal,
.oksy3-popup-pro{
  width:min(1080px, calc(100vw - 32px))!important;
  max-width:1080px!important;
  border:0!important;
  border-radius:30px!important;
  overflow:hidden!important;
  background:#fff!important;
  box-shadow:0 30px 90px rgba(15,23,42,.34)!important;
}

.oksy3-popup-pro{
  display:grid!important;
  grid-template-columns:1.2fr .8fr;
  min-height:540px;
}

.oksy3-popup-poster{
  position:relative;
  min-height:540px;
  background:#eaf6ff;
  overflow:hidden;
}

.oksy3-popup-poster img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.oksy3-popup-poster:after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(180deg,rgba(15,23,42,0),rgba(15,23,42,.18));
}

.oksy3-popup-badge{
  position:absolute;
  left:18px;
  top:18px;
  z-index:2;
  display:inline-flex;
  border-radius:999px;
  padding:8px 13px;
  background:rgba(255,255,255,.94);
  color:#1d4ed8;
  font-size:13px;
  font-weight:950;
  box-shadow:0 10px 24px rgba(15,23,42,.14);
}

.oksy3-popup-content{
  padding:30px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:18px;
  background:
    radial-gradient(circle at top right,rgba(37,99,235,.10),transparent 36%),
    linear-gradient(135deg,#ffffff,#f8fafc);
}

.oksy3-popup-top{
  display:flex;
  justify-content:space-between;
  gap:14px;
}

.oksy3-popup-kicker{
  display:inline-flex;
  border-radius:999px;
  padding:7px 12px;
  background:#eff6ff;
  color:#1d4ed8;
  font-size:12px;
  font-weight:950;
  margin-bottom:12px;
}

.oksy3-popup-title{
  font-size:clamp(26px,3vw,40px);
  line-height:1.12;
  font-weight:950;
  letter-spacing:-.055em;
  color:#0f172a;
  margin:0 0 12px;
}

.oksy3-popup-desc{
  color:#475569;
  font-size:16px;
  line-height:1.72;
  margin:0;
}

.oksy3-popup-date{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:18px;
}

.oksy3-popup-date span{
  display:inline-flex;
  border-radius:999px;
  padding:7px 11px;
  background:#fff;
  border:1px solid #e2e8f0;
  color:#334155;
  font-size:13px;
  font-weight:850;
}

.oksy3-popup-points{
  display:grid;
  gap:10px;
  margin-top:18px;
}

.oksy3-popup-point{
  display:flex;
  gap:10px;
  padding:11px 12px;
  border:1px solid #e2e8f0;
  border-radius:16px;
  background:rgba(255,255,255,.82);
  color:#334155;
  font-size:14px;
  font-weight:750;
}

.oksy3-popup-point strong{
  color:#16a34a;
}

.oksy3-popup-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  border-top:1px solid #e2e8f0;
  padding-top:18px;
}

.oksy3-popup-actions a,
.oksy3-popup-actions button{
  border-radius:999px!important;
  padding:11px 17px!important;
  font-weight:950!important;
  border:1px solid #dbeafe!important;
  background:#fff!important;
  color:#1d4ed8!important;
  text-decoration:none!important;
  box-shadow:0 8px 18px rgba(15,23,42,.06);
  transition:.15s ease;
  cursor:pointer;
}

.oksy3-popup-actions a:hover,
.oksy3-popup-actions button:hover{
  transform:translateY(-2px);
  background:#eff6ff!important;
}

.oksy3-popup-actions .oksy3-popup-primary{
  background:linear-gradient(135deg,#2563eb,#1d4ed8)!important;
  color:#fff!important;
  border:0!important;
}

.oksy3-popup-x{
  width:44px;
  height:44px;
  border-radius:999px!important;
  border:1px solid #e2e8f0!important;
  background:#fff!important;
  color:#0f172a!important;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:950;
  flex:0 0 auto;
  cursor:pointer;
}

.oksy3-popup-note{
  color:#94a3b8;
  font-size:12px;
  margin-top:10px;
}

@media (max-width:900px){
  .oksy3-popup-pro{
    grid-template-columns:1fr;
    max-height:calc(100vh - 28px);
    overflow:auto!important;
  }

  .oksy3-popup-poster{
    min-height:240px;
  }

  .oksy3-popup-content{
    padding:22px;
  }

  .oksy3-popup-actions a,
  .oksy3-popup-actions button{
    width:100%;
    text-align:center;
  }
}

/* =====================================================
   OKSY3 Popup PRO Compact Override v2
   ลดขนาด popup ให้พอดีจอมากขึ้น
===================================================== */

.oksy3-modal,
.oksy3-popup-pro{
  width:min(880px, calc(100vw - 44px))!important;
  max-width:880px!important;
  border-radius:26px!important;
}

.oksy3-popup-pro{
  grid-template-columns:1fr .95fr;
  min-height:430px!important;
  max-height:calc(100vh - 70px)!important;
}

.oksy3-popup-poster{
  min-height:430px!important;
}

.oksy3-popup-poster img{
  object-fit:cover!important;
  object-position:center center!important;
}

.oksy3-popup-content{
  padding:24px!important;
  gap:12px!important;
}

.oksy3-popup-kicker{
  padding:6px 10px!important;
  font-size:11px!important;
  margin-bottom:9px!important;
}

.oksy3-popup-title{
  font-size:clamp(24px,2.4vw,34px)!important;
  line-height:1.12!important;
  margin-bottom:10px!important;
}

.oksy3-popup-desc{
  font-size:14.5px!important;
  line-height:1.62!important;
}

.oksy3-popup-date{
  gap:8px!important;
  margin-top:12px!important;
}

.oksy3-popup-date span{
  padding:6px 10px!important;
  font-size:12px!important;
}

.oksy3-popup-points{
  gap:8px!important;
  margin-top:12px!important;
}

.oksy3-popup-point{
  padding:9px 11px!important;
  border-radius:14px!important;
  font-size:13px!important;
}

.oksy3-popup-actions{
  padding-top:14px!important;
  gap:8px!important;
}

.oksy3-popup-actions a,
.oksy3-popup-actions button{
  padding:9px 14px!important;
  font-size:13.5px!important;
}

.oksy3-popup-x{
  width:38px!important;
  height:38px!important;
}

.oksy3-popup-note{
  font-size:11.5px!important;
  margin-top:8px!important;
}

/* จอเล็ก/โน้ตบุ๊ก ให้ลดลงอีก */
@media (max-height:760px){
  .oksy3-modal,
  .oksy3-popup-pro{
    width:min(820px, calc(100vw - 40px))!important;
  }

  .oksy3-popup-pro{
    min-height:390px!important;
  }

  .oksy3-popup-poster{
    min-height:390px!important;
  }

  .oksy3-popup-content{
    padding:20px!important;
  }

  .oksy3-popup-title{
    font-size:28px!important;
  }

  .oksy3-popup-desc{
    font-size:13.5px!important;
    line-height:1.55!important;
  }

  .oksy3-popup-point{
    padding:8px 10px!important;
  }
}

/* มือถือ */
@media (max-width:900px){
  .oksy3-modal,
  .oksy3-popup-pro{
    width:min(94vw, 520px)!important;
    max-height:calc(100vh - 28px)!important;
  }

  .oksy3-popup-pro{
    grid-template-columns:1fr!important;
    min-height:auto!important;
  }

  .oksy3-popup-poster{
    min-height:210px!important;
    max-height:230px!important;
  }

  .oksy3-popup-content{
    padding:20px!important;
  }
}

/* =====================================================
   OKSY3 Popup PRO Poster Fit Override v3
   ใช้กับภาพโปสเตอร์แนวนอน เพื่อให้เห็นภาพครบทั้งใบ
===================================================== */

.oksy3-popup-poster{
  background:
    linear-gradient(135deg,#dff5ff,#f8fbff) !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:0 !important;
}

.oksy3-popup-poster img{
  width:100% !important;
  height:100% !important;
  object-fit:contain !important;
  object-position:center center !important;
  background:#dff5ff !important;
}

/* ลด overlay เพราะภาพโปสเตอร์มีข้อความอยู่แล้ว */
.oksy3-popup-poster:after{
  background:linear-gradient(180deg,rgba(15,23,42,0),rgba(15,23,42,.04)) !important;
}

/* ขยายฝั่งรูปนิดหนึ่ง ให้โปสเตอร์แนวนอนอ่านง่ายขึ้น */
.oksy3-popup-pro{
  grid-template-columns:1.18fr .82fr !important;
}

/* ถ้าจอเตี้ย ให้รักษาสัดส่วน ไม่ครอป */
@media (max-height:760px){
  .oksy3-popup-pro{
    grid-template-columns:1.15fr .85fr !important;
  }
}

/* มือถือยังให้เห็นภาพครบ */
@media (max-width:900px){
  .oksy3-popup-poster img{
    object-fit:contain !important;
  }
}
