/**
 * SNAPSMACK — Social Profile Dock
 * ss-engine-social-dock.css
 *
 * Floating dock of social profile links styled as independent circles
 * matching the download button aesthetic. Each icon is a 48px dark
 * semi-translucent circle with a subtle border. The whole dock is
 * semi-transparent at idle and reveals fully on hover proximity.
 *
 * 8 position classes: 4 corners + 4 side edges.
 * Side-mounted docks slide off-screen during scroll via JS toggle.
 *
 * CSS custom properties (set inline from PHP):
 *   --dock-bg:       circle background colour (rgba)
 *   --dock-border:   circle border colour (rgba)
 *   --dock-icon:     SVG icon fill/stroke colour
 */

/* ─── BASE DOCK ────────────────────────────────────────────────── */

.social-dock {
    position: fixed;
    z-index: 9998;
    display: flex;
    gap: 10px;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;

    /* Semi-translucent at idle, full on hover */
    opacity: var(--dock-idle-opacity, 0.5);
    transition: opacity 0.3s ease;
}

.social-dock:hover {
    opacity: 1;
}


/* ─── ICON LINKS ───────────────────────────────────────────────── */

.dock-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--dock-bg, rgba(0, 0, 0, 0.7));
    border: 2px solid var(--dock-border, rgba(255, 255, 255, 0.3));
    color: var(--dock-icon, #fff);
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease,
                background 0.15s ease,
                border-color 0.15s ease;
}

.dock-link:hover {
    transform: scale(1.1);
    background: var(--dock-bg-hover, rgba(0, 0, 0, 0.9));
    border-color: var(--dock-border-hover, rgba(255, 255, 255, 0.7));
}

.dock-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}


/* ─── DOWNLOAD ICON IN DOCK ────────────────────────────────────── */

.dock-link .snap-download-icon {
    display: block;
    width: 20px;
    height: 20px;
    position: relative;
}

.dock-link .snap-download-icon::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    width: 2px;
    height: 13px;
    background: var(--dock-icon, #fff);
    transform: translateX(-50%);
}

.dock-link .snap-download-icon::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 8px;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--dock-icon, #fff);
    border-bottom: 2px solid var(--dock-icon, #fff);
    transform: translateX(-50%) rotate(45deg);
}

.dock-link .snap-download-icon span {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--dock-icon, #fff);
}


/* ─── ICON DROP SHADOW (optional) ──────────────────────────────── */

.dock-shadow .dock-link {
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

.dock-shadow .dock-link:hover {
    filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.5));
}


/* ─── CORNER POSITIONS (horizontal row) ────────────────────────── */

.dock-top-left,
.dock-top-right,
.dock-bottom-left,
.dock-bottom-right {
    flex-direction: row;
}

.dock-top-left {
    top: 16px;
    left: 16px;
}

.dock-top-right {
    top: 16px;
    right: 16px;
}

.dock-bottom-left {
    bottom: 16px;
    left: 16px;
}

.dock-bottom-right {
    bottom: 16px;
    right: 16px;
}


/* ─── SIDE POSITIONS (vertical column) ─────────────────────────── */

.dock-left-top,
.dock-left-bottom,
.dock-right-top,
.dock-right-bottom {
    flex-direction: column;
    /* JS overrides top/bottom/max-height to stay clear of header + nav bar.
       overflow-y:hidden clips any excess icons rather than overlapping. */
    overflow-y: hidden;
}

.dock-left-top {
    left: 16px;
    top: 16px;
}

.dock-left-bottom {
    left: 16px;
    bottom: 16px;
}

.dock-right-top {
    right: 16px;
    top: 16px;
}

.dock-right-bottom {
    right: 16px;
    bottom: 16px;
}


/* ─── SCROLL SLIDE ANIMATION (sides only, toggled by JS) ──────── */

.dock-left-top,
.dock-left-bottom,
.dock-right-top,
.dock-right-bottom {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity   0.4s cubic-bezier(0.4, 0, 0.2, 1),
                top       0.15s ease,
                bottom    0.15s ease,
                max-height 0.15s ease;
}

.dock-left-top.dock-hidden,
.dock-left-bottom.dock-hidden {
    transform: translateX(calc(-100% - 20px));
    opacity: 0;
}

.dock-right-top.dock-hidden,
.dock-right-bottom.dock-hidden {
    transform: translateX(calc(100% + 20px));
    opacity: 0;
}


/* ─── STANDALONE DOWNLOAD SUPPRESSION ──────────────────────────── */
/* JS hides the standalone .snap-download-btn when dock absorbs it */


/* ─── RESPONSIVE ───────────────────────────────────────────────── */

@media (max-width: 480px) {
    .social-dock {
        display: none;
    }
}
