/* Social Popup Follower v1.1 - Frontend */

#spf-widget {
    position: fixed !important;
    z-index: 999999 !important;
    display: flex;
    flex-direction: column;
    gap: 8px;
    --spf-size: 48px;
    pointer-events: none;
}

/* Positioning */
#spf-widget.spf-pos-center-right {
    top: 50% !important;
    right: 0 !important;
    left: auto !important;
    transform: translateY(-50%) !important;
    align-items: flex-end;
}
#spf-widget.spf-pos-center-left {
    top: 50% !important;
    left: 0 !important;
    right: auto !important;
    transform: translateY(-50%) !important;
    align-items: flex-start;
}
#spf-widget.spf-pos-bottom-right {
    bottom: 30px !important;
    right: 20px !important;
    left: auto !important;
    align-items: flex-end;
}
#spf-widget.spf-pos-bottom-left {
    bottom: 30px !important;
    left: 20px !important;
    right: auto !important;
    align-items: flex-start;
}
#spf-widget.spf-pos-top-right {
    top: 80px !important;
    right: 20px !important;
    left: auto !important;
    align-items: flex-end;
}
#spf-widget.spf-pos-top-left {
    top: 80px !important;
    left: 20px !important;
    right: auto !important;
    align-items: flex-start;
}

/* Each item hidden & off-screen by default */
#spf-widget .spf-item {
    opacity: 0;
    pointer-events: none;
    transform: translateX(120%);
    transition:
        opacity   0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
        transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    transition-delay: calc(var(--spf-i, 0) * 0.1s);
}

/* Left side slides from left */
#spf-widget.spf-pos-center-left .spf-item,
#spf-widget.spf-pos-bottom-left  .spf-item,
#spf-widget.spf-pos-top-left     .spf-item {
    transform: translateX(-120%);
}

/* VISIBLE — JS adds this class */
#spf-widget.spf-visible .spf-item {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateX(0) !important;
}
#spf-widget.spf-visible {
    pointer-events: auto;
}

/* Link */
#spf-widget .spf-link {
    display: flex;
    align-items: center;
    text-decoration: none !important;
    outline: none;
}

/* Icon circle/square */
#spf-widget .spf-icon {
    width: var(--spf-size);
    height: var(--spf-size);
    min-width: var(--spf-size);
    background-color: var(--spf-brand, #555);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px 0 0 10px;
    box-shadow: -3px 3px 16px rgba(0,0,0,0.25);
    transition:
        transform 0.25s cubic-bezier(0.34,1.56,0.64,1),
        box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

/* Left side: rounded on right */
#spf-widget.spf-pos-center-left .spf-icon,
#spf-widget.spf-pos-bottom-left  .spf-icon,
#spf-widget.spf-pos-top-left     .spf-icon {
    border-radius: 0 10px 10px 0;
    box-shadow: 3px 3px 16px rgba(0,0,0,0.25);
}

/* Corner positions: fully rounded */
#spf-widget.spf-pos-bottom-right .spf-icon,
#spf-widget.spf-pos-top-right    .spf-icon,
#spf-widget.spf-pos-bottom-left  .spf-icon,
#spf-widget.spf-pos-top-left     .spf-icon {
    border-radius: 12px;
}

#spf-widget .spf-icon svg {
    width: calc(var(--spf-size) * 0.46);
    height: calc(var(--spf-size) * 0.46);
    position: relative;
    z-index: 1;
    transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1);
}

/* Gloss shimmer */
#spf-widget .spf-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(155deg, rgba(255,255,255,0.22) 0%, transparent 60%);
    pointer-events: none;
    z-index: 2;
}

/* Label — hidden, slides out on hover */
#spf-widget .spf-label {
    display: flex;
    align-items: center;
    height: var(--spf-size);
    padding: 0;
    background-color: var(--spf-brand, #555);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    white-space: nowrap;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    transition:
        max-width 0.3s cubic-bezier(0.4,0,0.2,1),
        opacity   0.25s ease,
        padding   0.3s cubic-bezier(0.4,0,0.2,1);
    border-radius: 0 10px 10px 0;
    box-shadow: 3px 3px 12px rgba(0,0,0,0.15);
    pointer-events: none;
}

/* Left side: label before icon */
#spf-widget.spf-pos-center-left .spf-label,
#spf-widget.spf-pos-bottom-left  .spf-label,
#spf-widget.spf-pos-top-left     .spf-label {
    order: -1;
    border-radius: 10px 0 0 10px;
    box-shadow: -3px 3px 12px rgba(0,0,0,0.15);
}

/* Hover: label slides out */
#spf-widget .spf-link:hover .spf-label {
    max-width: 180px;
    opacity: 1;
    padding: 0 14px;
    pointer-events: auto;
}

/* Hover: icon scales */
#spf-widget .spf-link:hover .spf-icon {
    transform: scale(1.1);
    box-shadow: -5px 4px 20px rgba(0,0,0,0.3);
}
#spf-widget .spf-link:hover .spf-icon svg {
    transform: scale(1.15) rotate(-8deg);
}

/* Snapchat: black icon on yellow */
#spf-widget .spf-net-snapchat .spf-icon {
    color: #111 !important;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
    #spf-widget .spf-item,
    #spf-widget .spf-icon,
    #spf-widget .spf-label {
        transition: none !important;
        animation: none !important;
    }
}
