/* ── Social Video Player ─────────────────────────────────────────── */

.svp-container {
    display: inline-block;
    width: 100%;
    line-height: 0;
}

.svp-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #000;
    cursor: pointer;
}

/* Aspect ratios via padding-bottom (set inline for fixed ratios, CSS for custom) */
.svp-wrapper.svp-ratio-9-16  { padding-bottom: 177.78%; }
.svp-wrapper.svp-ratio-4-5   { padding-bottom: 125%; }
.svp-wrapper.svp-ratio-1-1   { padding-bottom: 100%; }
.svp-wrapper.svp-ratio-16-9  { padding-bottom: 56.25%; }

/* Video fills the wrapper */
.svp-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── Overlay ─────────────────────────────────────────────────────── */

.svp-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1;
}

/* Hide overlay when playing full video */
.svp-container.svp-playing .svp-overlay {
    opacity: 0;
}

/* ── Play Button ─────────────────────────────────────────────────── */

.svp-play-btn {
    position: absolute;
    z-index: 2;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, opacity 0.3s ease;
    padding: 0;
    line-height: 0;
}

.svp-play-btn svg {
    width: 40%;
    height: 40%;
}

.svp-play-btn:hover {
    transform: scale(1.1);
}

/* Positions */
.svp-pos-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.svp-pos-center:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

.svp-pos-bottom-left {
    bottom: 16px;
    left: 16px;
}

.svp-pos-bottom-right {
    bottom: 16px;
    right: 16px;
}

/* Styles */
.svp-play-circle {
    border-radius: 50%;
}

.svp-play-triangle {
    background: transparent !important;
}

.svp-play-triangle svg {
    width: 60%;
    height: 60%;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

.svp-play-rounded {
    border-radius: 12px;
}

/* Hide play button when playing */
.svp-container.svp-playing .svp-play-btn {
    opacity: 0;
    pointer-events: none;
}

/* ── Caption ─────────────────────────────────────────────────────── */

.svp-caption {
    position: absolute;
    bottom: 16px;
    left: 16px;
    right: 16px;
    z-index: 2;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
    line-height: 1.4;
    transition: opacity 0.3s ease;
}

.svp-container.svp-playing .svp-caption {
    opacity: 0;
}

/* ── Loading state ───────────────────────────────────────────────── */

.svp-container.svp-loading .svp-play-btn svg {
    animation: svp-spin 0.8s linear infinite;
}

@keyframes svp-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
