.ket-video-card-template {
    width: min(420px, 100%);
}

.ket-video-card-template__trigger {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    text-align: left;
    transition: transform 0.2s ease;
}

.ket-video-card-template__media {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #d9dce2;
    box-shadow: 0 14px 34px rgba(17, 24, 39, 0.18);
}

.ket-video-card-template__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.ket-video-card-template__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.03) 40%,
        rgba(0, 0, 0, 0.12) 100%
    );
}

.ket-video-card-template__play {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    width: 84px;
    height: 84px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 16px 34px rgba(17, 24, 39, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ket-video-card-template__play::before {
    content: "";
    display: block;
    margin-left: 6px;
    width: 0;
    height: 0;
    border-top: 16px solid transparent;
    border-bottom: 16px solid transparent;
    border-left: 24px solid #4b5563;
}

.ket-video-card-template__trigger:hover,
.ket-video-card-template__trigger:focus-visible {
    transform: translateY(-2px);
}

.ket-video-card-template__trigger:hover .ket-video-card-template__play,
.ket-video-card-template__trigger:focus-visible .ket-video-card-template__play {
    transform: translate(-50%, -50%) scale(1.06);
    box-shadow: 0 18px 38px rgba(17, 24, 39, 0.3);
}

.ket-video-card-template__trigger:focus-visible {
    outline: 2px solid #0d6f98;
    outline-offset: 4px;
}

.ket-video-card-template__modal[hidden] {
    display: none;
}

.ket-video-card-template__modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: rgba(0, 0, 0, 0.72);
    box-sizing: border-box;
}

.ket-video-card-template__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
}

.ket-video-card-template__dialog {
    position: relative;
    z-index: 2;
    width: min(1100px, calc(100vw - 32px));
    max-width: 100%;
}

.ket-video-card-template__close {
    position: absolute;
    top: -14px;
    right: -14px;
    z-index: 3;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: #ffffff;
    color: #111827;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.ket-video-card-template__frame-wrap {
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: calc(100vh - 64px);
    overflow: hidden;
    background: #000000;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.ket-video-card-template__frame {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

@media (max-width: 768px) {
    .ket-video-card-template {
        width: min(100%, 360px);
    }

    .ket-video-card-template__modal {
        padding: 12px;
    }

    .ket-video-card-template__dialog {
        width: calc(100vw - 24px);
        max-width: 100%;
    }

    .ket-video-card-template__frame-wrap {
        max-height: calc(100vh - 32px);
    }

    .ket-video-card-template__close {
        top: -10px;
        right: -2px;
        width: 36px;
        height: 36px;
        font-size: 24px;
    }

    .ket-video-card-template__play {
        width: 72px;
        height: 72px;
    }
}
