/* ── FAB Chat Button ── */
.fab {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 56px;
    height: 56px;
    border-radius: 18px;
    /*background: #1a1815;*/
    background: #BD945A;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
            0 8px 28px rgba(0,0,0,0.22),
            0 2px 8px rgba(0,0,0,0.14),
            0 0 0 1px rgba(255,255,255,0.06) inset;
    transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.2s ease, background 0.2s ease;
    z-index: 200;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.fab:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 36px rgba(0,0,0,0.28), 0 2px 8px rgba(0,0,0,0.14);
}

.fab:active { transform: scale(0.95); }

/* Icon swap: chat ↔ close */
.fab .icon-chat,
.fab .icon-close {
    position: absolute;
    transition: opacity 0.2s ease, transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
}

.fab .icon-chat  { opacity: 1; transform: scale(1) rotate(0deg); }
.fab .icon-close { opacity: 0; transform: scale(0.5) rotate(-90deg); }

.fab.open .icon-chat  { opacity: 0; transform: scale(0.5) rotate(90deg); }
.fab.open .icon-close { opacity: 1; transform: scale(1) rotate(0deg); }

/* Pulse ring on idle */
.fab::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 22px;
    border: 2px solid rgba(26,24,21,0.25);
    animation: pulse 2.5s ease-out infinite;
    pointer-events: none;
}

.fab.open::after { animation: none; opacity: 0; }

@keyframes pulse {
    0%   { transform: scale(1);   opacity: 0.6; }
    60%  { transform: scale(1.25); opacity: 0; }
    100% { transform: scale(1.25); opacity: 0; }
}

/* ── Tray ── */
.tray {
    position: fixed;
    bottom: 96px;
    right: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 16px 10px;
    background: rgba(255,255,255,0.6);
    border: 1px solid rgba(255,255,255,0.92);
    border-radius: 26px;
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    box-shadow:
            0 8px 32px rgba(0,0,0,0.09),
            0 2px 8px rgba(0,0,0,0.05),
            0 0 0 1px rgba(255,255,255,0.65) inset;
    z-index: 190;
    pointer-events: none;

    /* Closed state */
    opacity: 0;
    transform: translateY(16px) scale(0.92);
    transform-origin: bottom center;
    transition:
            opacity 0.35s cubic-bezier(0.4,0,0.2,1),
            transform 0.4s cubic-bezier(0.34,1.4,0.64,1);
}

.tray.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* ── Tray label ── */
.tray-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #b0a898;
    margin-bottom: 4px;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.25s 0.15s ease, transform 0.25s 0.15s ease;
}

.tray.open .tray-label {
    opacity: 1;
    transform: translateY(0);
}

/* ── Lines between icons ── */
.line {
    width: 1px;
    height: 14px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.05), rgba(0,0,0,0.1), rgba(0,0,0,0.05));
    border-radius: 1px;
    flex-shrink: 0;
}

/* ── Social Item ── */
.social-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-btn {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    border: none;
    outline: none;
    background: transparent;
    -webkit-tap-highlight-color: transparent;
    transition:
            transform 0.25s cubic-bezier(0.34,1.56,0.64,1),
            background 0.18s ease,
            box-shadow 0.18s ease;

    /* Individual stagger – set via JS */
    opacity: 0;
    transform: translateY(12px) scale(0.85);
}

.tray.open .social-btn {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.social-btn svg {
    width: 20px;
    height: 20px;
    display: block;
    transition: transform 0.22s cubic-bezier(0.34,1.56,0.64,1);
}

.social-btn:hover {
    transform: scale(1.18) translateX(-4px);
}

.social-btn:hover svg {
    width: 100%;
    height: 100%;
}
.social-btn:active { transform: scale(0.94); }

/* Brand hover colours */
.btn-twitter:hover   { background: rgba(29,155,240,0.12);  box-shadow: 0 4px 16px rgba(29,155,240,0.2);  }
.btn-instagram:hover { background: rgba(225,48,108,0.10);  box-shadow: 0 4px 16px rgba(225,48,108,0.18); }
.btn-linkedin:hover  { background: rgba(10,102,194,0.12);  box-shadow: 0 4px 16px rgba(10,102,194,0.2);  }
.btn-youtube:hover   { background: rgba(255,0,0,0.10);     box-shadow: 0 4px 16px rgba(255,0,0,0.18);    }
.btn-tiktok:hover    { background: rgba(0,0,0,0.07);       box-shadow: 0 4px 16px rgba(0,0,0,0.12);      }
.btn-github:hover    { background: rgba(36,41,47,0.10);    box-shadow: 0 4px 16px rgba(36,41,47,0.18);   }
.btn-discord:hover   { background: rgba(88,101,242,0.12);  box-shadow: 0 4px 16px rgba(88,101,242,0.2);  }

/* ── Tooltip ── */
.tooltip {
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%) translateX(6px);
    background: rgba(15,15,20,0.88);
    color: #fff;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 5px 11px;
    border-radius: 8px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.16s ease, transform 0.16s ease;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}

.tooltip::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 5px solid rgba(15,15,20,0.88);
}

.social-item:hover .tooltip {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}
