/* =========================
   MINI VIDEO GÓC PHẢI DƯỚI
   ========================= */

#svw-mini.svw-mini,
.svw-mini {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 180px;
    z-index: 9999;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: transparent;
}

/* Khung chứa video mini */
.svw-mini-video-wrap {
    position: relative;
  
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

/* Video mini */
.svw-mini-video-wrap .svw-video,
.svw-mini-video-wrap iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Text nếu cần dùng cho mini (hiện tại bạn đang dùng cho overlay) */
.svw-mini-text {
    padding: 4px 6px 6px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.svw-mini-close {
    position: absolute;
    top: -20px;
    right: -28px;
    border: none;
    color: red;
    width: 22px;
    height: 22px;
    line-height: 22px;
    border-radius: 999px;
    font-size: 25px;
    cursor: pointer;
    z-index: 3;
}

/* Nút loa mini ở góc trái dưới */
.svw-mini-sound {
    position: absolute;
    left: 6px;
    bottom: 6px;
    border: none;
    border-radius: 999px;
    width: 26px;
    height: 26px;
    font-size: 16px;
    line-height: 26px;
    text-align: center;
      color: #fff;
    cursor: pointer;
    z-index: 3;
}

.svw-mini-sound.svw-sound-off {
    opacity: 0.7;
}

/* =========================
   OVERLAY FULL MÀN
   ========================= */

.svw-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.svw-overlay-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.7);
}

.svw-overlay-center {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-height: 100vh;
}

.svw-overlay-box {
    position: relative;
}

.svw-overlay-close {
    position: absolute;
    top: -20px;
    right: -55px;
    background: transparent;
    border: none;
    color: red;
    font-size: 30px;
    cursor: pointer;
    z-index: 999;
}
/* Video dựng đứng ở giữa */
.svw-overlay-video-wrap {
    position: relative;
    max-width: 90vw;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
}

.svw-overlay-video-wrap .svw-video,
.svw-overlay-video-wrap iframe {
    width: 100%;
    height: 640px;
    object-fit: cover;
    display: block;
}

/* =========================
   LIST SẢN PHẨM TRONG VIDEO
   ========================= */

.svw-overlay-products {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 8px 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.9) 0%,
        rgba(0,0,0,0.7) 50%,
        transparent 100%
    );
}

.svw-overlay-product {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    border-radius: 12px;
    background-color: #ffffff1a;
    text-decoration: none;
    color: #fff;
}

a.svw-overlay-product:hover {
    color: #fff;
}

/* Ảnh sản phẩm */
.svw-op-img img {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 10px;
}

/* Thông tin sản phẩm */
.svw-op-info {
    flex: 1;
    margin-left: 8px;
}

.svw-op-title {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 2px;
}

.svw-op-price {
    font-size: 11px;
    opacity: 0.9;
}

.svw-op-price span.woocommerce-Price-amount.amount {
    color: #fff;
}

/* Icon giỏ hàng */
.svw-op-icon {
    font-size: 16px;
    margin-left: 6px;
}

/* =========================
   TRẠNG THÁI & RESPONSIVE
   ========================= */

/* Ẩn overlay */
.svw-hidden {
    display: none;
}

/* Mobile */
@media (max-width: 600px) {
    #svw-mini.svw-mini,
    .svw-mini {
        width: 120px;
        bottom: 12px;
        right: 12px;
    }

    .svw-overlay-video-wrap .svw-video,
    .svw-overlay-video-wrap iframe {
        height: 70vh;
    }
}
/* Volume mini đẹp */

.svw-volume-toggle {
  --color: #ffffff;
  --size: 24px;
  position: absolute;
  left: 6px;
  bottom: 6px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  font-size: var(--size);
  user-select: none;
  fill: var(--color);
  z-index: 3;
}

/* ẩn checkbox default */
.svw-volume-toggle .svw-volume-input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

/* icon */
.svw-volume-toggle .mute,
.svw-volume-toggle .voice {
  position: absolute;
  animation: svw-keyframes-fill .5s;
}

.svw-volume-toggle .voice {
  display: none;
}

/* On check: bật tiếng → hiện icon loa, ẩn icon mute */
.svw-volume-toggle .svw-volume-input:checked ~ .mute {
  display: none;
}

.svw-volume-toggle .svw-volume-input:checked ~ .voice {
  display: block;
}

/* animation */
@keyframes svw-keyframes-fill {
  0% {
    transform: rotate(0deg) scale(0);
    opacity: 0;
  }
  50% {
    transform: rotate(-10deg) scale(1.2);
  }
}
