/*! L7xBET Video Platform — Credit: L7xBET | Copyright (c) 2026 L7xBET (l7xbet.com). All rights reserved. */
:host { display: block; }
:root {
  --l7x-brand: #03775a;
  --l7x-wm-size: 120px;
}

.l7x-player, .l7x-player *, .l7x-player *::before, .l7x-player *::after { box-sizing: border-box; margin: 0; padding: 0; }
.l7x-player {
  position: absolute; inset: 0; background: #000 center / contain no-repeat;
  color: #fff; user-select: none; -webkit-user-select: none; overflow: hidden; outline: none;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans Thai', sans-serif; font-size: 14px; line-height: 1.4;
  -webkit-tap-highlight-color: transparent; container-type: inline-size;
}
.l7x-player video.l7x-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; background: transparent; outline: none;
}
.l7x-player.is-idle { cursor: none; }

.l7x-wm { position: absolute; z-index: 30; transition: opacity .3s; display: block; }
.l7x-wm:hover { opacity: 1 !important; }
.l7x-wm img { height: var(--l7x-wm-size); width: auto; display: block; filter: drop-shadow(0 2px 6px rgba(0,0,0,.8)); max-width: 40cqw; object-fit: contain; }
.l7x-wm-tl { top: 14px; left: 14px; } .l7x-wm-tr { top: 14px; right: 14px; }
.l7x-wm-bl { bottom: 70px; left: 14px; } .l7x-wm-br { bottom: 70px; right: 14px; }

.l7x-spin {
  position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px;
  z-index: 15; pointer-events: none; opacity: 0; transition: opacity .2s;
}
.l7x-player.is-waiting .l7x-spin { opacity: 1; transition-delay: .25s; }
.l7x-spin::before, .l7x-spin::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%; border: 3px solid transparent;
}
.l7x-spin::before { border-top-color: var(--l7x-brand); animation: l7spin 1s linear infinite; }
.l7x-spin::after { border-bottom-color: rgba(255,255,255,.25); animation: l7spin 1.5s linear infinite reverse; }
@keyframes l7spin { to { transform: rotate(360deg); } }

.l7x-big {
  position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px;
  border-radius: 50%; border: 0; background: var(--l7x-brand); color: #fff; z-index: 16;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: 0 6px 30px rgba(0,0,0,.5); transition: transform .15s, opacity .2s;
}
.l7x-big:hover { transform: scale(1.06); }
.l7x-big svg { width: 34px; height: 34px; margin-left: 4px; }
.l7x-player.is-started .l7x-big { opacity: 0; pointer-events: none; }

.l7x-ctrl {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 20;
  padding: 28px 12px 8px; background: linear-gradient(transparent, rgba(0,0,0,.85));
  transition: opacity .25s, transform .25s;
}
.l7x-player.is-idle .l7x-ctrl, .l7x-player.is-idle .l7x-wm { opacity: 0; }
.l7x-player.is-idle .l7x-ctrl { transform: translateY(6px); pointer-events: none; }
.l7x-player:not(.is-started) .l7x-ctrl { opacity: 0; pointer-events: none; }

.l7x-row { display: flex; align-items: center; gap: 2px; }
.l7x-btn {
  width: 40px; height: 40px; border: 0; background: transparent; color: #fff; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; flex: 0 0 auto;
}
.l7x-btn:hover, .l7x-btn:focus-visible { background: rgba(255,255,255,.12); outline: none; }
.l7x-btn svg { width: 22px; height: 22px; fill: currentColor; }
.l7x-btn[hidden] { display: none; }
.l7x-time { font-size: 13px; font-variant-numeric: tabular-nums; padding: 0 8px; white-space: nowrap; opacity: .95; }
.l7x-sp { flex: 1; }
.l7x-badge {
  font-size: 10px; font-weight: 700; background: var(--l7x-brand); border-radius: 3px;
  padding: 1px 4px; margin-left: -10px; margin-top: -16px; pointer-events: none;
}

.l7x-vol { display: flex; align-items: center; }
.l7x-vol input {
  width: 0; opacity: 0; transition: width .2s, opacity .2s; accent-color: var(--l7x-brand); cursor: pointer;
}
.l7x-vol:hover input, .l7x-vol input:focus { width: 80px; opacity: 1; margin-right: 6px; }

.l7x-prog {
  position: relative; height: 18px; display: flex; align-items: center; cursor: pointer; touch-action: none;
  margin: 0 6px 2px;
}
.l7x-track { position: relative; width: 100%; height: 4px; background: rgba(255,255,255,.2); border-radius: 2px; transition: height .12s; }
.l7x-prog:hover .l7x-track, .l7x-prog.is-drag .l7x-track { height: 6px; }
.l7x-buf, .l7x-play { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; width: 0; }
.l7x-buf { background: rgba(255,255,255,.35); }
.l7x-play { background: var(--l7x-brand); }
.l7x-thumb {
  position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.5); transform: scale(0); transition: transform .12s; left: 0;
}
.l7x-prog:hover .l7x-thumb, .l7x-prog.is-drag .l7x-thumb { transform: scale(1); }
.l7x-tip {
  position: absolute; bottom: 22px; transform: translateX(-50%); background: rgba(15,23,42,.95);
  font-size: 12px; padding: 3px 7px; border-radius: 4px; white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity .1s; font-variant-numeric: tabular-nums;
}
.l7x-prog:hover .l7x-tip, .l7x-prog.is-drag .l7x-tip { opacity: 1; }

.l7x-menu {
  position: absolute; right: 12px; bottom: 62px; min-width: 190px; max-height: 70%; overflow-y: auto;
  background: rgba(15,23,42,.96); border-radius: 10px; padding: 6px; z-index: 25; font-size: 14px;
  box-shadow: 0 10px 40px rgba(0,0,0,.5);
}
.l7x-menu[hidden] { display: none; }
.l7x-mi {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%;
  padding: 9px 12px; border: 0; background: transparent; color: #e2e8f0; border-radius: 6px;
  cursor: pointer; font: inherit; text-align: left;
}
.l7x-mi:hover, .l7x-mi:focus-visible { background: rgba(255,255,255,.08); outline: none; }
.l7x-mi small { color: #94a3b8; font-size: 13px; }
.l7x-mi.is-on { color: #fff; font-weight: 600; }
.l7x-mi.is-on::after { content: '✓'; color: var(--l7x-brand); }
.l7x-mh { padding: 8px 12px 6px; color: #94a3b8; font-size: 12px; display: flex; align-items: center; gap: 8px; cursor: pointer; }

.l7x-toast {
  position: absolute; left: 50%; top: 18px; transform: translate(-50%, -10px); z-index: 40;
  background: rgba(15,23,42,.92); padding: 8px 14px; border-radius: 8px; font-size: 13px;
  opacity: 0; transition: opacity .25s, transform .25s; pointer-events: none; display: flex; gap: 10px; align-items: center;
  max-width: calc(100% - 32px);
}
.l7x-toast.is-on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.l7x-toast button { background: transparent; border: 1px solid rgba(255,255,255,.3); color: #fff; border-radius: 5px; padding: 2px 8px; cursor: pointer; font: inherit; font-size: 12px; }

.l7x-tap {
  position: absolute; top: 0; bottom: 0; width: 35%; z-index: 12; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .3s;
  background: radial-gradient(circle, rgba(255,255,255,.15), transparent 70%);
}
.l7x-tap.l { left: 0; } .l7x-tap.r { right: 0; }
.l7x-tap.is-on { opacity: 1; transition: none; }

.l7x-err {
  position: absolute; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 12px; background: rgba(0,0,0,.85); text-align: center; padding: 24px;
}
.l7x-err[hidden] { display: none; }
.l7x-err button { background: var(--l7x-brand); color: #fff; border: 0; border-radius: 8px; padding: 8px 18px; cursor: pointer; font: inherit; }

@container (max-width: 640px) {
  .l7x-wm-tl, .l7x-wm-tr { top: 8px; } .l7x-wm-tl, .l7x-wm-bl { left: 8px; } .l7x-wm-tr, .l7x-wm-br { right: 8px; }
  .l7x-wm img { height: calc(var(--l7x-wm-size) * .6); }
  .l7x-hide-sm { display: none !important; }
  .l7x-ctrl { padding: 24px 6px 4px; }
  .l7x-btn { width: 38px; height: 38px; }
  .l7x-time { font-size: 12px; padding: 0 4px; }
}
@media (hover: none) {
  .l7x-vol input { display: none; }
}

.l7x-ad { position: absolute; inset: 0; z-index: 45; background: #000; display: none; }
.l7x-ad.is-on { display: block; }
.l7x-ad-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; cursor: pointer; background: #000; }
.l7x-ad-badge { position: absolute; left: 12px; bottom: 14px; background: rgba(0,0,0,.72); border: 1px solid rgba(255,255,255,.18); padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; letter-spacing: .02em; }
.l7x-ad-badge b { color: #facc15; margin-right: 6px; }
.l7x-ad-skip { position: absolute; right: 0; bottom: 18px; background: rgba(0,0,0,.78); color: #fff; border: 1px solid rgba(255,255,255,.35); border-right: 0; padding: 10px 18px; font: inherit; font-weight: 600; cursor: pointer; border-radius: 8px 0 0 8px; display: flex; align-items: center; gap: 8px; }
.l7x-ad-skip:disabled { cursor: default; opacity: .85; }
.l7x-ad-skip:not(:disabled):hover { background: #fff; color: #000; }
.l7x-ad-cta { position: absolute; left: 12px; top: 12px; background: var(--l7x-brand); color: #fff; border: 0; padding: 8px 14px; border-radius: 8px; font: inherit; font-weight: 700; cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,.4); }
.l7x-ad-sound { position: absolute; right: 12px; top: 12px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; display: grid; place-items: center; }
.l7x-ad-sound svg { width: 20px; height: 20px; fill: currentColor; }
.l7x-banner { position: absolute; left: 50%; transform: translateX(-50%) translateY(10px); z-index: 28; max-width: min(728px, 92%); opacity: 0; transition: opacity .3s, transform .3s; pointer-events: none; }
.l7x-banner.is-on { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.l7x-banner-bottom { bottom: 78px; } .l7x-banner-top { top: 14px; }
.l7x-banner img { display: block; max-width: 100%; max-height: 22cqh; border-radius: 6px; cursor: pointer; box-shadow: 0 8px 30px rgba(0,0,0,.5); }
.l7x-x { position: absolute; top: -10px; right: -10px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: #111; color: #fff; cursor: pointer; font-size: 14px; line-height: 24px; box-shadow: 0 2px 8px rgba(0,0,0,.6); }
.l7x-card { position: absolute; inset: 0; z-index: 35; display: none; align-items: center; justify-content: center; flex-direction: column; gap: 14px; background: rgba(0,0,0,.72); backdrop-filter: blur(4px); padding: 20px; text-align: center; }
.l7x-card.is-on { display: flex; }
.l7x-card .l7x-card-box { position: relative; max-width: min(560px, 86%); }
.l7x-card img { display: block; max-width: 100%; max-height: 52cqh; border-radius: 10px; cursor: pointer; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.l7x-card .l7x-card-acts { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.l7x-btn-solid { background: var(--l7x-brand); color: #fff; border: 0; padding: 10px 18px; border-radius: 10px; font: inherit; font-weight: 700; cursor: pointer; }
.l7x-btn-line { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.4); padding: 10px 18px; border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer; }
.l7x-pause-label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
