/*
 * Изолированные базовые стили видеовизитки (.vc-root)
 * Без сторонних CSS-библиотек и без глобального сброса стилей страницы.
 */

.vc-root {
    position: relative;
    width: 100%;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, sans-serif;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
}

.vc-root *,
.vc-root *::before,
.vc-root *::after {
    box-sizing: border-box;
}

.vc-stage {
    position: relative;
    width: 100%;
    min-height: 600px;
    height: 100vh;
    height: 100dvh;
    margin: 0 auto;
    overflow: hidden;
    z-index: 1;
    background-color: #000000;
}

.vc-video {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    z-index: 1;
}

.vc-poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    z-index: 2;
    pointer-events: none;
    opacity: 1;
    transition: opacity 320ms ease;
}

.vc-poster--hidden {
    opacity: 0;
}

.vc-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
}

/* AJAX-лоадер загрузки фонового видео */
.vc-loader {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 12;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    pointer-events: none;
    backdrop-filter: blur(6px);
    transition: opacity 250ms ease;
}

.vc-loader--hidden {
    opacity: 0;
    visibility: hidden;
}

.vc-loader__ring {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-top-color: var(--vc-loader-color, #feb302);
    animation: vc-spin 0.8s linear infinite;
}

/* Полоса прогресса и таймер */
.vc-progress {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 10;
    pointer-events: none;
}

.vc-progress--top {
    top: 0;
}

.vc-progress--bottom {
    bottom: 0;
}

.vc-progress__track {
    position: relative;
    width: 100%;
    height: 3px;
    background: transparent;
    overflow: hidden;
}

.vc-progress__bar {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 0%;
    background: #feb302;
    transition: width 150ms linear;
}

.vc-progress__time {
    position: absolute;
    top: 6px;
    left: 10px;
    font-size: 14px;
    line-height: 1.2;
    color: #ffffff;
    z-index: 11;
    pointer-events: none;
    user-select: none;
}

/* Кнопки управления видео (Play и Звук) */
.vc-play-btn,
.vc-volume-btn {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    border: none;
    outline: none;
    background: none;
    cursor: pointer;
    user-select: none;
    z-index: 8;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.vc-play-btn {
    left: 0;
    right: 0;
    top: 23%;
    width: 70px;
    height: 70px;
    margin: 0 auto;
    transition: opacity 250ms ease, transform 250ms ease, background 250ms ease, border-color 250ms ease, box-shadow 250ms ease;
}

.vc-play-btn--hidden {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: scale(0.9);
}

.vc-volume-btn {
    right: 5%;
    top: 10%;
    width: 50px;
    height: 50px;
    transition: opacity 250ms ease, transform 250ms ease, background 250ms ease, border-color 250ms ease, box-shadow 250ms ease;
}

.vc-play-btn img,
.vc-volume-btn img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    pointer-events: none;
}

.vc-play-btn svg,
.vc-volume-btn svg {
    display: block;
    pointer-events: none;
}

/* Варианты пульсации для Play и Звука */
.vc-pulse-ring::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 105%;
    height: 105%;
    border-style: solid;
    border-width: var(--vc-pulse-border-width, 1px);
    border-color: var(--vc-pulse-color, rgb(67, 149, 144));
    border-radius: 50%;
    pointer-events: none;
    animation: vc-pulse-ring var(--vc-pulse-duration, 3s) linear infinite;
}

.vc-pulse-scale {
    animation: vc-pulse-scale var(--vc-pulse-duration, 2s) ease-in-out infinite;
}

.vc-pulse-shadow {
    animation: vc-pulse-shadow var(--vc-pulse-duration, 2s) ease-in-out infinite;
}

/* Блок оверлейного контента и группы кнопок */
.vc-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 10%;
    width: fit-content;
    min-width: 225px;
    max-width: 300px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    z-index: 6;
}

.vc-btn-group {
    list-style: none;
    margin: 0 auto;
    padding: 0;
    display: flex;
    width: 100%;
}

.vc-btn-item {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
    display: flex;
    flex: 1 1 auto;
}

.vc-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-decoration: none;
    cursor: pointer;
    outline: none;
    user-select: none;
    transition: all 300ms ease;
    -webkit-tap-highlight-color: transparent;
}

.vc-btn__media {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.vc-btn__img {
    display: block;
    max-width: 100%;
    height: auto;
}

.vc-btn__icon {
    display: block;
    flex-shrink: 0;
}

.vc-btn__label {
    display: inline-block;
    white-space: nowrap;
}

/* Вспомогательные маркеры для конструктора */
.vc-root--interactive [data-vc-target] {
    cursor: pointer;
}

.vc-is-selected {
    outline: 2px dashed #38bdf8 !important;
    outline-offset: 3px !important;
}

/* Ключевые кадры анимаций */
@keyframes vc-pulse-ring {
    0% {
        transform: translate(-50%, -50%) translateZ(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) translateZ(0) scale(var(--vc-pulse-scale, 1.5));
        opacity: 0;
    }
}

@keyframes vc-pulse-scale {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(var(--vc-pulse-scale, 1.1));
    }
    100% {
        transform: scale(1);
    }
}

@keyframes vc-pulse-shadow {
    0% {
        box-shadow: 0 0 0 0 var(--vc-pulse-color, rgba(204, 169, 44, 0.45));
    }
    70% {
        box-shadow: 0 0 0 12px rgba(204, 169, 44, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(204, 169, 44, 0);
    }
}

@keyframes vc-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Анимации эффектов кнопок по таймкоду */
@keyframes vc-fx-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(var(--vc-fx-scale, 1.1));
    }
}

@keyframes vc-fx-bounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    40% {
        transform: translateY(-8px) scale(var(--vc-fx-scale, 1.06));
    }
    60% {
        transform: translateY(-4px) scale(1.02);
    }
}

@keyframes vc-fx-shake {
    0%, 100% {
        transform: translateX(0) rotate(0deg);
    }
    20% {
        transform: translateX(-4px) rotate(-1.5deg);
    }
    40% {
        transform: translateX(4px) rotate(1.5deg);
    }
    60% {
        transform: translateX(-3px) rotate(-1deg);
    }
    80% {
        transform: translateX(3px) rotate(1deg);
    }
}

@keyframes vc-fx-glow {
    0%, 100% {
        box-shadow: 0 0 6px var(--vc-fx-color, rgba(56, 189, 248, 0.45));
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 22px var(--vc-fx-color, rgba(56, 189, 248, 0.85));
        transform: scale(var(--vc-fx-scale, 1.05));
    }
}

