/* =============================================
 * ASD Video Testimonial Widget v4
 * Buttons are <div> — immune to theme reset.css
 * ============================================= */

.asd-vt {
    display: inline-block;
    width: 100%;
}

.asd-vt__wrapper {
    position: relative;
    overflow: hidden;
    background: #000;
}

.asd-vt__ratio {
    display: block;
    width: 100%;
    height: 0;
}

.asd-vt__media {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

.asd-vt__video {
    position: absolute;
    top: 50%; left: 50%;
    min-width: 100%; min-height: 100%;
    width: auto; height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

.asd-vt__youtube,
.asd-vt__vimeo {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

.asd-vt__youtube iframe,
.asd-vt__vimeo iframe {
    width: 100%; height: 100%;
    border: 0;
}

.asd-vt__placeholder {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: rgba(255,255,255,0.5);
    font-size: 14px;
}

.asd-vt__placeholder i {
    font-size: 48px;
}

/* Overlay */
.asd-vt__overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    z-index: 5;
    transition: opacity 0.4s ease;
}

.asd-vt__overlay.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.asd-vt__overlay-tint {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

/* Big play */
.asd-vt__big-play {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 0;
    transition: transform 0.25s ease, opacity 0.3s ease;
}

.asd-vt__big-play:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

.asd-vt__big-play.is-hidden {
    opacity: 0;
    pointer-events: none;
}

/* =============================================
 * Controls — <div> based, zero inheritance
 * ============================================= */
.asd-vt__controls {
    position: absolute;
    z-index: 15;
    display: flex;
    align-items: center;
}

.asd-vt__btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(59, 130, 246, 0.9);
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-sizing: border-box;
    transition: background-color 0.2s ease, transform 0.15s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.asd-vt__btn:hover {
    background-color: rgba(37, 99, 235, 1);
    transform: scale(1.08);
}

.asd-vt__btn:active {
    transform: scale(0.95);
}

.asd-vt__btn svg {
    display: block;
    width: 50%;
    height: 50%;
    flex-shrink: 0;
    pointer-events: none;
}

/* Position helpers */
.asd-vt__pos--bottom-left   { bottom: 16px; left: 16px; }
.asd-vt__pos--bottom-center { bottom: 16px; left: 50%; transform: translateX(-50%); }
.asd-vt__pos--bottom-right  { bottom: 16px; right: 16px; }
.asd-vt__pos--top-left      { top: 16px; left: 16px; }
.asd-vt__pos--top-center    { top: 16px; left: 50%; transform: translateX(-50%); }
.asd-vt__pos--top-right     { top: 16px; right: 16px; }

/* Caption */
.asd-vt__caption {
    position: absolute;
    z-index: 15;
    font-size: 14px;
    line-height: 1.3;
    white-space: nowrap;
    max-width: calc(100% - 120px);
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Bottom gradient */
.asd-vt__wrapper::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 80px;
    background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 100%);
    z-index: 4;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 767px) {
    .asd-vt__hide-mobile { display: none !important; }
    .asd-vt__pos--bottom-left,
    .asd-vt__pos--bottom-right,
    .asd-vt__pos--bottom-center { bottom: 12px; }
    .asd-vt__pos--bottom-left,
    .asd-vt__pos--top-left { left: 12px; }
    .asd-vt__pos--bottom-right,
    .asd-vt__pos--top-right { right: 12px; }
    .asd-vt__pos--top-left,
    .asd-vt__pos--top-right,
    .asd-vt__pos--top-center { top: 12px; }
    .asd-vt__caption { font-size: 12px; }
}

/* Playing state */
.asd-vt.is-playing .asd-vt__controls {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}
.asd-vt.is-playing:hover .asd-vt__controls {
    opacity: 1;
}
