/* ============================================
   PREMIUM SIDEBAR STYLES
   Modern floating sidebar with discrete buttons
============================================ */

.sidebar {
    position: fixed;
    right: 10px;
    /* Slight gap from edge */
    top: calc(var(--navbar-height) + 16px) !important;
    bottom: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 18px;
    /* Premium spacing */
    padding: 0;
    /* Removed container styles for floating look */
    background: transparent;
    backdrop-filter: none;
    border-radius: 0;
    box-shadow: none;
    border: none;
    overflow-y: auto;
    scrollbar-width: none;
    width: auto;
    max-height: none;
    pointer-events: none;
    /* Let clicks pass through gaps */
}

.sidebar>* {
    pointer-events: auto;
    /* Re-enable clicks on children */
}

.sidebar::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar Chrome/Safari */
}

/* App Store Links */
.sidebar-apps {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 0;
    border-bottom: none;
    margin-bottom: 0;
}

.app-link {
    width: 50px;
    /* Larger touch target */
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 24px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.app-link.play-store {
    background: #000000;
    /* Black as per reference */
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.app-link.app-store {
    background: #000000;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.app-link:hover {
    transform: scale(1.15) translateY(-2px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25);
    z-index: 20;
}

/* Social Links */
.sidebar-social {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-link {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 22px;
    color: var(--white);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.social-link:hover {
    transform: scale(1.15) translateY(-2px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

/* Original colors tailored to Reference */
.social-link.facebook {
    background: #1877f2;
}

.social-link.twitter {
    background: #1da1f2;
}

.social-link.youtube {
    background: #ff0000;
}

.social-link.pinterest {
    background: #e60023;
}

.social-link.linkedin {
    background: #0a66c2;
}

.social-link.instagram {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

/* Utility Links */
.sidebar-tools {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 0;
    border-top: none;
    margin-top: 0;
}

.tool-link {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    /* Softer rounded corners */
    font-size: 22px;
    background: rgba(255, 255, 255, 0.85);
    /* Glassy */
    color: var(--primary-blue);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
}

.tool-link span {
    display: none;
    /* Hide text label for square icon look */
}

.tool-link:hover {
    background: var(--white);
    color: var(--primary-blue);
    transform: scale(1.15) translateY(-2px);
    box-shadow: 0 15px 30px rgba(0, 167, 225, 0.3);
    border-color: var(--white);
    z-index: 20;
}

/* Tooltips - Left Side now */
.sidebar a[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    right: 55px;
    /* Push to left of icon */
    top: 50%;
    transform: translateY(-50%);
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.8);
    color: var(--white);
    font-size: 12px;
    font-weight: 500;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-fast);
    pointer-events: none;
}

.sidebar a[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
    right: 60px;
}

/* Responsive */
@media (max-width: 1200px) {
    .sidebar {
        top: calc(var(--navbar-height) + 8px) !important;
        transform: scale(0.9);
        transform-origin: top right;
        padding: 0;
        bottom: 10px;
        right: 5px;
    }

    .app-link,
    .social-link,
    .tool-link {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }
}

@media (max-width: 992px) {
    .sidebar {
        display: none;
    }
}

/* ============================================
   LIQUID GLASS ANIMATION
   Glossy shine effect for sidebar icons
============================================ */
@keyframes liquidShine {
    0% {
        left: -100%;
        opacity: 0;
    }

    10% {
        opacity: 0.5;
    }

    20% {
        left: 200%;
        opacity: 0;
    }

    100% {
        left: 200%;
        opacity: 0;
    }
}

.app-link::after,
.social-link::after,
.tool-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.4),
            transparent);
    transform: skewX(-20deg);
    pointer-events: none;
    z-index: 10;
    animation: liquidShine 4s infinite;
}

/* Stagger animations for wave effect */
.sidebar-apps .app-link:nth-child(1)::after {
    animation-delay: 0s;
}

.sidebar-apps .app-link:nth-child(2)::after {
    animation-delay: 0.2s;
}

.sidebar-social .social-link:nth-child(1)::after {
    animation-delay: 0.5s;
}

.sidebar-social .social-link:nth-child(2)::after {
    animation-delay: 0.6s;
}

.sidebar-social .social-link:nth-child(3)::after {
    animation-delay: 0.7s;
}

.sidebar-social .social-link:nth-child(4)::after {
    animation-delay: 0.8s;
}

.sidebar-social .social-link:nth-child(5)::after {
    animation-delay: 0.9s;
}

.sidebar-social .social-link:nth-child(6)::after {
    animation-delay: 1.0s;
}

.sidebar-tools .tool-link::after {
    animation-delay: 1.5s;
}
