/* ============================================================
   FILE: /assets/css/social-bar.css
   STATUS: CHANGED

   Purpose:
   Left-edge social drawer with a raised tab and local icons.
   Typography remains controlled by base.css.

   Future note:
   Adjust the variables below for drawer width, tab size, and speed.
   Keep the closed panel inert and only the tab exposed.
   ============================================================ */

.social-bar {
    --social-panel-width: 12.5rem;
    --social-tab-width: 2.5rem;
    --social-slide-duration: 220ms;

    position: fixed;
    z-index: 45;
    top: 50%;
    left: 0;
    width: var(--social-panel-width);
    transform: translate(-100%, -50%);
    transition: transform var(--social-slide-duration) ease;
}

.social-bar.is-open {
    transform: translate(0, -50%);
}

/* ============================================================
   Purpose: Raised tab remains accessible while the panel is closed
   ============================================================ */

.social-bar__tab {
    position: absolute;
    top: 50%;
    left: 100%;
    display: grid;
    place-items: center;
    width: var(--social-tab-width);
    min-height: 6rem;
    padding: 1rem 0.6rem;
    border: 1px solid rgba(196, 196, 196, 0.2);
    border-left: 0;
    border-radius: 0 0.75rem 0.75rem 0;
    background: var(--color-grey-darkest);
    box-shadow: 5px 4px 18px rgba(0, 0, 0, 0.35);
    transform: translateY(-50%);
    cursor: pointer;
    writing-mode: vertical-rl;
}

.social-bar__tab:hover {
    background: #25022f;
}

.social-bar__tab:focus-visible,
.social-bar__entry:focus-visible {
    outline: 2px solid var(--color-purple-pale);
    outline-offset: 3px;
}

/* ============================================================
   Purpose: Compact panel and aligned icon entries
   ============================================================ */

.social-bar__panel {
    padding: 1rem;
    border: 1px solid rgba(196, 196, 196, 0.2);
    border-left: 0;
    border-radius: 0 1rem 1rem 0;
    background: rgba(26, 26, 26, 0.97);
    box-shadow: 5px 5px 24px rgba(0, 0, 0, 0.3);
    visibility: hidden;
}

.social-bar.is-open .social-bar__panel {
    visibility: visible;
}

.social-bar__list {
    display: grid;
    gap: 0.3rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.social-bar__entry {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 2.75rem;
    padding: 0.5rem;
    border-radius: 0.5rem;
}

.social-bar__entry:hover {
    background: rgba(121, 72, 135, 0.15);
}

.social-bar__entry--placeholder {
    opacity: 0.65;
    cursor: default;
}

.social-bar__icon {
    flex-shrink: 0;
    width: 1.2rem;
    height: 1.2rem;
}

.social-bar__placeholder-label {
    margin-left: auto;
}

/* ============================================================
   Purpose: Keep the mobile drawer and its tab 50px above the bottom.
   ============================================================ */

@media (max-width: 900px) {
    .social-bar {
        top: auto;
        bottom: 50px;
        transform: translateX(-100%);
    }

    .social-bar.is-open {
        transform: translateX(0);
    }

    .social-bar__tab {
        top: auto;
        bottom: 0;
        transform: none;
    }
}

@media (max-width: 600px) {
    .social-bar {
        --social-tab-width: 2rem;
    }
}

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