/* ============================================================================
   SYNAPTROSPACE - CUSTOM STYLES ONLY
   Tailwind utilities come from the CDN script in index.html.
   ============================================================================ */

/* 1. DESIGN TOKENS ---------------------------------------------------------- */
:root {
    --fb-blue: #1877F2;
    --fb-blue-hover: #166FE5;
    --fb-blue-soft: #E7F3FF;
    --fb-green: #42B72A;
    --fb-green-hover: #36A420;
    --fb-online: #31A24C;
    --fb-red: #E41E3F;
    --chat-accent: #0084FF;

    --bg-canvas: #F0F2F5;
    --bg-surface: #FFFFFF;
    --bg-subtle: #F0F2F5;
    --bg-muted: #E4E6EB;
    --bg-hover: #D8DADF;
    --border-light: #DADDE1;
    --text-primary: #050505;
    --text-secondary: #65676B;
}

.dark {
    --bg-canvas: #18191A;
    --bg-surface: #242526;
    --bg-subtle: #3A3B3C;
    --bg-muted: #3A3B3C;
    --bg-hover: #4E4F50;
    --border-light: #3A3B3C;
    --text-primary: #E4E6EB;
    --text-secondary: #B0B3B8;
}

/* 2. BASE ------------------------------------------------------------------- */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 3. VISIBILITY ------------------------------------------------------------- */
.hidden {
    display: none !important;
}

/* Keep responsive "hidden lg:block" style elements working despite !important */
@media (min-width: 768px) {
    #messengerCenterPanel.hidden {
        display: flex !important;
    }
}

@media (min-width: 1024px) {
    aside.hidden.lg\:block {
        display: block !important;
    }
}

@media (min-width: 1280px) {
    aside.hidden.xl\:block {
        display: block !important;
    }
    #messengerRightPanel.hidden {
        display: flex !important;
    }
}

/* 4. SCROLLBARS ------------------------------------------------------------- */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(101, 103, 107, 0.35);
    border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(101, 103, 107, 0.55);
}

/* 5. NAV TABS --------------------------------------------------------------- */
.top-nav-tab {
    color: var(--text-secondary);
    border-bottom: 3px solid transparent;
    border-radius: 0;
}

.active-top-tab {
    color: #1877F2 !important;
    border-bottom: 3px solid #1877F2 !important;
    border-radius: 0 !important;
}

.active-profile-subtab {
    color: #1877F2 !important;
    background-color: rgba(24, 119, 242, 0.08);
    border-bottom: 2px solid #1877F2 !important;
    border-radius: 8px 8px 0 0 !important;
}

/* 6. VERIFIED TICK & ONLINE DOTS ------------------------------------------- */
.verified-tick {
    color: var(--fb-blue);
}

.online-dot,
.presence-dot-online {
    background-color: #31A24C;
    box-shadow: 0 0 0 2px #FFFFFF;
}

.dark .online-dot,
.dark .presence-dot-online {
    box-shadow: 0 0 0 2px #242526;
}

.presence-text-online {
    color: #31A24C;
    font-weight: 600;
}

.presence-text-offline {
    color: #65676B;
    font-weight: 500;
}

.dark .presence-text-offline {
    color: #B0B3B8;
}

/* 7. STORIES & STYLED POSTS ------------------------------------------------- */
.story-card {
    width: 115px;
    height: 200px;
    flex-shrink: 0;
    border-radius: 14px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.story-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}

.story-card img.story-bg-media,
.story-card video.story-bg-media {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.28s ease;
}

.story-card:hover img.story-bg-media,
.story-card:hover video.story-bg-media {
    transform: scale(1.04);
}

.post-bg-sunset,
.post-bg-ocean,
.post-bg-emerald {
    color: #FFFFFF;
    min-height: 210px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 28px 20px;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
    border-radius: 12px;
}

.post-bg-sunset {
    background: linear-gradient(135deg, #FF512F 0%, #DD2476 100%);
}

.post-bg-ocean {
    background: linear-gradient(135deg, #0072FF 0%, #00C6FF 100%);
}

.post-bg-emerald {
    background: linear-gradient(135deg, #11998E 0%, #38EF7D 100%);
}

/* 8. MESSENGER BUBBLES ------------------------------------------------------ */
.msg-bubble-sent {
    background-color: var(--chat-accent, #0084FF);
    color: #FFFFFF;
    border-radius: 18px 18px 4px 18px;
    padding: 9px 14px;
    font-size: 0.9rem;
    line-height: 1.38;
    max-width: 75%;
    word-break: break-word;
}

.msg-bubble-received {
    background-color: #E4E6EB;
    color: #050505;
    border-radius: 18px 18px 18px 4px;
    padding: 9px 14px;
    font-size: 0.9rem;
    line-height: 1.38;
    max-width: 75%;
    word-break: break-word;
}

.dark .msg-bubble-received {
    background-color: #3A3B3C;
    color: #E4E6EB;
}

/* 9. TOAST ------------------------------------------------------------------ */
@keyframes toastPop {
    0% {
        opacity: 0;
        transform: translate(-50%, 10px);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.toast-visible {
    display: flex !important;
    animation: toastPop 0.2s ease-out forwards;
}