/* Videmi Social Proof Lite v1.0.0 — fully scoped, no conflicts */

/* ============================================================
   POPUP BASE
   ========================================================== */
.vdm-proof {
    position: fixed;
    z-index: 999990;
    width: 220px;
    max-width: calc(800vw - 32px);
    display: flex;
    align-items: center;
    overflow: hidden;

    /* Glassmorphism */
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.8) 100%);
    backdrop-filter: blur(24px) saturate(200%);
    -webkit-backdrop-filter: blur(24px) saturate(200%);

    /* Border */
    border: 0px solid rgba(255, 255, 255, 0.9);

    /* Shadow */
    box-shadow:
        0 24px 50px -10px rgba(0, 0, 0, 0.15),
        0 8px 16px -4px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 1);

    /* Hidden state */
    opacity: 0;
    pointer-events: none;
    transition:
        opacity 0.4s ease,
        transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
        visibility 0s linear 0.4s;
    visibility: hidden;

    font-family: inherit;
    box-sizing: border-box;
    cursor: default;
}

/* Visible state */
.vdm-proof--visible {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transition:
        opacity 0.4s ease,
        transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
        visibility 0s linear 0s;
}

/* ============================================================
   POSITIONS
   ========================================================== */
.vdm-proof--bottom-left {
    bottom: var(--vdm-spl-b, 28px);
    left: var(--vdm-spl-s, 28px);
    transform: translateY(30px) scale(0.95);
}
.vdm-proof--bottom-left.vdm-proof--visible {
    transform: translateY(0) scale(1);
}

.vdm-proof--bottom-right {
    bottom: var(--vdm-spl-b, 28px);
    right: var(--vdm-spl-s, 28px);
    transform: translateY(30px) scale(0.95);
}
.vdm-proof--bottom-right.vdm-proof--visible {
    transform: translateY(0) scale(1);
}

.vdm-proof--bottom-center {
    bottom: var(--vdm-spl-b, 28px);
    left: 50%;
    transform: translateX(-50%) translateY(30px) scale(0.95);
}
.vdm-proof--bottom-center.vdm-proof--visible {
    transform: translateX(-50%) translateY(0) scale(1);
}

/* ============================================================
   GLOW BAR (left accent)
   ========================================================== */
.vdm-proof__glow {
    width: 4px;
    align-self: stretch;
    flex-shrink: 0;
    border-radius: 0;
    /* background & box-shadow set by JS via CSS var */
    background: linear-gradient(180deg, #ff6b4a 0%, var(--vdm-bc, #dc2626) 100%);
    box-shadow: 0 0 18px rgba(220, 38, 38, 0.45);
}

/* ============================================================
   ICON
   ========================================================== */
.vdm-proof__icon {
    padding: 4px 4px 4px 4px;
    flex-shrink: 0;
}
.vdm-proof__icon-glow {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    /* background radial-gradient applied via JS using --vdm-bc color */
    display: flex;
    align-items: center;
    justify-content: center;
}
.vdm-proof__icon-glow svg {
    display: block;
}

/* ============================================================
   BODY
   ========================================================== */
.vdm-proof__body {
    flex: 1;
    padding: 6px 9px 6px 3px;
    min-width: 0;
}
.vdm-proof__title {
    font-size: 11px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.3;
    margin: 0 0 3px 0;
}
.vdm-proof__meta {
    font-size: 8px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 3px;
    margin: 0;
}
.vdm-proof__meta svg {
    display: none; /* Removed clock icon to save space and match sample */
}
.vdm-proof__link {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-top: 4px;
    font-size: 7px;
    font-weight: 500;
}
.vdm-proof__link svg {
    transition: transform 0.2s ease;
}
.vdm-proof--clickable:hover .vdm-proof__link svg {
    transform: translateX(3px);
}

/* ============================================================
   CLOSE BUTTON
   ========================================================== */
.vdm-proof__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    min-height: 0 !important;
    min-width: 0 !important;
    margin: 0 !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    line-height: 1;
    transition: background 0.15s ease !important;
    z-index: 10;
}
.vdm-proof__close:hover {
    background: rgba(0, 0, 0, 0.06) !important;
}
.vdm-proof__close svg {
    display: block;
    pointer-events: none;
}

/* ============================================================
   CLICKABLE WRAPPER (when cta_link set)
   ========================================================== */
.vdm-proof--clickable {
    cursor: pointer;
}
.vdm-proof--clickable:hover {
    box-shadow:
        0 22px 60px rgba(15, 23, 42, 0.20),
        0 0 0 1px rgba(255, 255, 255, 0.65);
}

/* ============================================================
   MOBILE
   ========================================================== */
@media (max-width: 390px) {
    .vdm-proof {
        width: calc(100vw - 24px);
        max-width: 230px;
        /* Always bottom-center on mobile */
        left: 60% !important;
        right: auto !important;
        bottom: 12px !important;
        transform: translateX(-50%) translateY(20px) !important;
    }
    .vdm-proof--visible {
        transform: translateX(-50%) translateY(0) !important;
    }
    .vdm-proof__title {
        font-size: 9px;
    }
}

/* ============================================================
   REDUCED MOTION
   ========================================================== */
@media (prefers-reduced-motion: reduce) {
    .vdm-proof {
        transition: opacity 0.2s ease, visibility 0s linear 0.2s;
    }
    .vdm-proof--bottom-left,
    .vdm-proof--bottom-right,
    .vdm-proof--bottom-center {
        transform: none !important;
    }
    .vdm-proof--bottom-center {
        transform: translateX(-50%) !important;
    }
    .vdm-proof--visible {
        transition: opacity 0.2s ease, visibility 0s linear 0s;
    }
}
