/**
 * HUSHIKO - Floating Social Media Bar
 * "Magical Starlight" Design
 *
 * Subtle glassmorphism effect with gentle glow
 * Matches the bedtime stories magical theme
 */

/* ============================================
   BASE STYLES
   ============================================ */

.social-floating {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;

    /* Hidden by default on mobile - footer is enough */
    display: none;
}

/* Show on larger screens */
@media (min-width: 992px) {
    .social-floating {
        display: block;
    }
}

/* ============================================
   INNER CONTAINER - Glassmorphism
   ============================================ */

.social-floating__inner {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 10px;

    /* Glassmorphism effect */
    background: rgba(255, 248, 240, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    /* Soft rounded shape */
    border-radius: 28px;

    /* Subtle border with brand color hint */
    border: 1px solid rgba(155, 135, 217, 0.2);

    /* Soft shadow with lavender tint */
    box-shadow:
        0 4px 24px rgba(155, 135, 217, 0.15),
        0 1px 3px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);

    /* Smooth transitions */
    transition:
        box-shadow 0.3s ease,
        transform 0.3s ease;
}

.social-floating__inner:hover {
    box-shadow:
        0 8px 32px rgba(155, 135, 217, 0.25),
        0 2px 6px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transform: translateX(-3px);
}

/* ============================================
   SOCIAL LINKS
   ============================================ */

.social-floating__link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;

    /* Base style - soft lavender */
    color: #9B87D9;
    background: rgba(155, 135, 217, 0.08);
    border-radius: 50%;

    /* Smooth transitions */
    transition:
        color 0.25s ease,
        background 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;

    /* Remove default link styles */
    text-decoration: none;
}

.social-floating__link:hover {
    transform: scale(1.1) translateY(-2px);
}

/* Facebook hover */
.social-floating__link--facebook:hover {
    color: #fff;
    background: linear-gradient(135deg, #1877F2, #0d65d9);
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.4);
}

/* Instagram hover - gradient */
.social-floating__link--instagram:hover {
    color: #fff;
    background: linear-gradient(135deg, #F58529, #DD2A7B, #8134AF);
    box-shadow: 0 4px 12px rgba(221, 42, 123, 0.4);
}

/* YouTube hover */
.social-floating__link--youtube:hover {
    color: #fff;
    background: linear-gradient(135deg, #FF0000, #cc0000);
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.4);
}

/* SVG icon sizing */
.social-floating__link svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ============================================
   DECORATIVE SPARKLE
   ============================================ */

.social-floating__sparkle {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 16px;
    height: 16px;
    pointer-events: none;

    /* Star shape using CSS */
    background: radial-gradient(circle, #FF9F66 0%, transparent 70%);
    border-radius: 50%;

    /* Pulsing animation */
    animation: sparkle-pulse 2s ease-in-out infinite;
    opacity: 0.7;
}

.social-floating__sparkle::before,
.social-floating__sparkle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2px;
    height: 12px;
    background: linear-gradient(to bottom, transparent, #FF9F66, transparent);
    transform: translate(-50%, -50%);
}

.social-floating__sparkle::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

@keyframes sparkle-pulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.2);
    }
}

/* ============================================
   SCROLL-BASED VISIBILITY (Optional)
   ============================================ */

/* Add .is-hidden class via JS if you want to hide on hero section */
.social-floating.is-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%) translateX(20px);
}

/* ============================================
   DARK MODE SUPPORT (data-theme="dark")
   ============================================ */

[data-theme="dark"] .social-floating__inner {
    background: rgba(30, 25, 45, 0.92);
    border-color: rgba(155, 135, 217, 0.3);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.5),
        0 1px 3px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .social-floating__inner:hover {
    box-shadow:
        0 8px 32px rgba(155, 135, 217, 0.3),
        0 2px 6px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .social-floating__link {
    color: #B8A8E8;
    background: rgba(155, 135, 217, 0.18);
}

[data-theme="dark"] .social-floating__sparkle {
    background: radial-gradient(circle, #FFB580 0%, transparent 70%);
    opacity: 0.8;
}

[data-theme="dark"] .social-floating__sparkle::before,
[data-theme="dark"] .social-floating__sparkle::after {
    background: linear-gradient(to bottom, transparent, #FFB580, transparent);
}

/* ============================================
   REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    .social-floating__inner,
    .social-floating__link {
        transition: none;
    }

    .social-floating__sparkle {
        animation: none;
        opacity: 0.6;
    }

    .social-floating__link:hover {
        transform: none;
    }
}
