/* ============================================
   💬 CHAT.CSS - Telegram-style Chat Interface
   ============================================ */

:root {
    --chat-bg: #0f0f0f;
    --chat-sidebar: #1a1a1a;
    --chat-list: #1e1e1e;
    --chat-header: #1a1a1a;
    --chat-input: #1e1e1e;
    --chat-bubble-out: #2f5b2f;
    --chat-bubble-in: #1e1e1e;
    --chat-text: #e8e8e8;
    --chat-muted: #888;
    --chat-border: #2a2a2a;
    --chat-hover: #2a2a2a;
    --chat-active: #3a3a3a;
    --chat-accent: #68d391;
    --chat-primary: #4FC3F7;
    --chat-danger: #e53e3e;
    --chat-radius: 8px;
    --sidebar-w: 80px;
    --chatlist-w: 320px;
}

.chat-app {
    display: flex;
    height: 100vh;
    width: 100vw;
    background: var(--chat-bg);
    color: var(--chat-text);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ===== SIDEBAR LEFT ===== */
.chat-sidebar {
    display: none;
}

.chat-sidebar-logo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--chat-accent);
    color: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.1rem;
    margin-bottom: 12px;
    cursor: pointer;
    flex-shrink: 0;
}

.chat-folder {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    cursor: pointer;
    transition: all 0.15s ease;
    color: var(--chat-muted);
    font-size: 0.6rem;
    text-align: center;
    border: none;
    background: transparent;
    padding: 4px;
    flex-shrink: 0;
}

.chat-folder i {
    font-size: 1.2rem;
}

.chat-folder:hover {
    background: var(--chat-hover);
    color: var(--chat-text);
}

.chat-folder.active {
    background: var(--chat-active);
    color: var(--chat-accent);
}

.chat-folder.active i {
    color: var(--chat-accent);
}

/* ===== CHAT LIST ===== */
.chat-list-panel {
    width: var(--chatlist-w);
    background: var(--chat-list);
    border-right: 1px solid var(--chat-border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.chat-list-header {
    padding: 16px 16px 12px;
    border-bottom: 1px solid var(--chat-border);
    background: var(--chat-header);
    flex-shrink: 0;
}

.chat-list-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--chat-text);
    margin: 0;
}

.chat-list-search {
    position: relative;
    margin-top: 10px;
}

.chat-list-search input {
    width: 100%;
    padding: 8px 12px 8px 34px;
    border-radius: var(--chat-radius);
    border: 1px solid var(--chat-border);
    background: var(--chat-sidebar);
    color: var(--chat-text);
    font-size: 0.82rem;
    outline: none;
    transition: border 0.2s;
}

.chat-list-search input:focus {
    border-color: var(--chat-accent);
}

.chat-list-search input::placeholder {
    color: var(--chat-muted);
}

.chat-list-search i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--chat-muted);
    font-size: 0.82rem;
}

.chat-list-items {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0;
}

.chat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.chat-item:hover {
    background: var(--chat-hover);
}

.chat-item.active {
    background: var(--chat-active);
}

.chat-item-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--chat-sidebar);
    overflow: hidden;
    position: relative;
}

.chat-item-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-item-avatar .avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

.chat-item-body {
    flex: 1;
    min-width: 0;
}

.chat-item-name {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.chat-item-name h4 {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--chat-text);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-item-time {
    font-size: 0.7rem;
    color: var(--chat-muted);
    flex-shrink: 0;
}

.chat-item-preview {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-item-preview p {
    font-size: 0.78rem;
    color: var(--chat-muted);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-item-badge {
    background: var(--chat-accent);
    color: #0a0a0a;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    flex-shrink: 0;
}

/* ===== CHAT WINDOW ===== */
.chat-window {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--chat-bg);
}

.chat-window-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--chat-border);
    background: var(--chat-header);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.chat-window-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--chat-sidebar);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
}

.chat-window-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-window-info {
    flex: 1;
    min-width: 0;
    cursor: default;
    user-select: none;
}

.chat-window-info h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
    color: var(--chat-text);
}

.chat-window-info span {
    font-size: 0.72rem;
    color: var(--chat-muted);
}

.chat-window-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.chat-window-actions button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--chat-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.15s;
    font-size: 1rem;
}
.chat-user-name {
    font-size: 0.75rem;
    color: var(--chat-accent);
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 12px;
    background: rgba(104,211,145,0.1);
    border: 1px solid rgba(104,211,145,0.2);
    white-space: nowrap;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: 0.2s;
    user-select: none;
    -webkit-user-select: none;
}
.chat-user-name:hover {
    background: rgba(104,211,145,0.2);
}
.chat-name-guide {
    font-size: 0.6rem;
    color: var(--chat-muted);
    display: flex;
    align-items: center;
    gap: 2px;
    white-space: nowrap;
    animation: guideFade 2s ease-in-out 3;
}
.chat-name-guide i {
    font-size: 0.55rem;
}
@keyframes guideFade {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

.chat-window-actions button:hover {
    background: var(--chat-hover);
    color: var(--chat-text);
}

/* Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    scrollbar-width: none;
}
.chat-messages::-webkit-scrollbar { display: none; width: 0; height: 0; }

.chat-date-divider {
    text-align: center;
    font-size: 0.7rem;
    color: var(--chat-muted);
    padding: 8px 0;
    position: sticky;
    top: 0;
    z-index: 1;
}

.chat-date-divider span {
    background: var(--chat-header);
    padding: 4px 12px;
    border-radius: 12px;
    border: 1px solid var(--chat-border);
}

.message {
    max-width: 75%;
    padding: 8px 14px;
    border-radius: 16px;
    font-size: 0.85rem;
    line-height: 1.45;
    position: relative;
    word-wrap: break-word;
    animation: msgIn 0.2s ease;
}

@keyframes msgIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.message.incoming {
    align-self: flex-start;
    background: var(--chat-bubble-in);
    border: 1px solid var(--chat-border);
    border-bottom-left-radius: 4px;
}

.message.outgoing {
    align-self: flex-end;
    background: var(--chat-bubble-out);
    border-bottom-right-radius: 4px;
}

.message .msg-sender {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--chat-accent);
    margin-bottom: 2px;
}

.message .msg-time {
    font-size: 0.6rem;
    color: rgba(255,255,255,0.4);
    text-align: right;
    margin-top: 4px;
}

.message .msg-check {
    font-size: 0.6rem;
    color: rgba(255,255,255,0.5);
    margin-left: 2px;
}

.message .msg-image {
    margin: -8px -14px 8px;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
    max-height: 200px;
}

.message .msg-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Product Card Message */
.message .msg-product {
    margin: 6px 0 4px;
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: 0.2s;
    border: 1px solid rgba(255,255,255,0.05);
}

.message .msg-product:hover {
    border-color: var(--chat-accent);
}

.message .msg-product img {
    width: 100%;
    max-height: 160px;
    object-fit: cover;
    display: block;
}

.message .msg-product-body {
    padding: 8px 12px 10px;
}

.message .msg-product-body h4 {
    font-size: 0.82rem;
    font-weight: 600;
    margin: 0 0 4px;
    color: var(--chat-text);
}

.message .msg-product-body .product-price {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--chat-accent);
}

.message .msg-product-body .product-desc {
    font-size: 0.72rem;
    color: var(--chat-muted);
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Image preview above input bar */
.chat-input-area {
    flex-shrink: 0;
}
.chat-image-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--chat-sidebar);
    border-top: 1px solid var(--chat-border);
}
.chat-image-preview img {
    max-width: 80px;
    max-height: 80px;
    border-radius: 6px;
    object-fit: cover;
}
.chat-image-remove {
    background: none;
    border: none;
    color: var(--chat-muted);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}
.chat-image-remove:hover {
    color: var(--chat-danger);
}
.chat-image-list {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    flex: 1;
}
.chat-image-thumb {
    position: relative;
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}
.chat-image-thumb img {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
}
.chat-image-thumb-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--chat-danger);
    color: #fff;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
}

/* Chat image message — fits within message bubble */
.chat-msg-images {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    margin-bottom: 8px;
}
.chat-msg-images .chat-msg-image {
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    margin-bottom: 0;
}
.chat-msg-images .chat-msg-image:only-child {
    grid-column: 1 / -1;
}
.chat-msg-image {
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    margin-bottom: 8px;
}
.chat-msg-image img {
    width: 100%;
    display: block;
    max-height: 300px;
    object-fit: contain;
    background: #000;
    border-radius: 10px;
}
.chat-msg-caption {
    margin-bottom: 4px;
}

/* Chat Input */
.chat-input-bar {
    padding: 8px 12px;
    border-top: 1px solid var(--chat-border);
    background: var(--chat-input);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.chat-input-bar input {
    flex: 1;
    border: none;
    padding: 15px 16px;
    border-radius: 24px;
    background: var(--chat-sidebar);
    color: var(--chat-text);
    font-size: 0.86rem;
    outline: none;
}

.chat-input-bar input::placeholder {
    color: var(--chat-muted);
}

.chat-input-bar button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--chat-accent);
    color: #0a0a0a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    font-size: 1rem;
    flex-shrink: 0;
}

.chat-input-bar button:hover {
    background: #7ae0a3;
    transform: scale(1.05);
}
.chat-input-bar button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}
.chat-input-bar button:disabled:hover {
    background: var(--chat-accent);
    transform: none;
}
.chat-input-bar input:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    caret-color: transparent;
}

/* Cooldown bar across input area */
.chat-cooldown-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.04);
    border-top: 1px solid var(--chat-border);
    position: relative;
    overflow: hidden;
}
.chat-cooldown-overlay {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 8px,
        rgba(255,255,255,0.03) 8px,
        rgba(255,255,255,0.03) 16px
    );
    animation: cooldownSlide 1s linear infinite;
}
@keyframes cooldownSlide {
    to { background-position: 16px 0; }
}
.chat-cooldown-text {
    position: relative;
    font-size: 0.78rem;
    color: var(--chat-muted);
    font-weight: 500;
    z-index: 1;
}
.chat-cooldown-text #chat-cooldown-count {
    font-weight: 700;
    color: var(--chat-accent);
    font-variant-numeric: tabular-nums;
}
.chat-input-area.cooldown-active {
    opacity: 0.45;
    pointer-events: none;
}
.chat-input-area.cooldown-active .chat-input-bar button:disabled {
    opacity: 0.3;
}

.chat-input-bar .attach-btn {
    background: transparent;
    color: var(--chat-muted);
}
.chat-input-bar .attach-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.chat-input-bar .attach-btn:hover {
    background: var(--chat-hover);
    color: var(--chat-text);
    transform: none;
}

/* Empty state */
.chat-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--chat-muted);
    gap: 12px;
}

.chat-empty i {
    font-size: 4rem;
    opacity: 0.3;
}

.chat-empty h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--chat-muted);
    margin: 0;
}

.chat-empty p {
    font-size: 0.82rem;
    color: var(--chat-muted);
    opacity: 0.7;
    margin: 0;
}

/* Scrollbar */
.chat-messages::-webkit-scrollbar {
    display: none;
}
.chat-messages {
    scrollbar-width: none;
}

/* Responsive */
@media (max-width: 768px) {
    .chat-sidebar {
        width: 60px;
    }
    .chat-folder {
        width: 44px;
        height: 44px;
        font-size: 0.55rem;
    }
    .chat-folder i {
        font-size: 1rem;
    }
    .chat-list-panel {
        width: 260px;
    }
}

@media (max-width: 600px) {
    html, body {
        overflow: hidden;
        height: 100%;
    }
    .chat-app {
        display: block;
    }
    .chat-sidebar {
        display: none;
    }
    .chat-list-panel {
        width: 100%;
        display: flex;
        position: fixed;
        inset: 0;
        z-index: 10;
    }
    .chat-list-panel.hide-mobile {
        display: none;
    }
    .chat-list-header {
        padding: 10px 12px;
        padding-top: calc(10px + env(safe-area-inset-top, 0));
    }
    .chat-list-items {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .chat-window {
        width: 100%;
        display: none;
        position: fixed;
        inset: 0;
        z-index: 20;
        background: var(--chat-bg, #0f0f0f);
    }
    .chat-window.show {
        display: flex;
        flex-direction: column;
    }
    .chat-window-header {
        padding: 8px 10px;
        padding-top: calc(8px + env(safe-area-inset-top, 0));
    }
    .chat-window-header h3 {
        font-size: 0.9rem;
    }
    .chat-messages {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .chat-input-bar {
        padding-bottom: calc(8px + env(safe-area-inset-bottom, 0));
    }
    .message {
        max-width: 90%;
    }
    .chat-mobile-back {
        display: flex !important;
    }
    .chat-item {
        padding: 14px 14px;
        gap: 14px;
    }
    .chat-item-avatar {
        width: 48px;
        height: 48px;
    }
    .chat-item-avatar img,
    .chat-item-avatar .avatar-placeholder {
        width: 48px;
        height: 48px;
    }
}

/* Folder tabs for mobile */
.chat-folder-tabs {
    display: none;
}

@media (max-width: 600px) {
    .chat-folder-tabs {
        display: flex;
        overflow-x: auto;
        gap: 6px;
        padding: 6px 12px 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        border-bottom: 1px solid rgba(255,255,255,0.06);
    }
    .chat-folder-tabs::-webkit-scrollbar {
        display: none;
    }
    .chat-folder-tab {
        flex-shrink: 0;
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 6px 14px;
        border-radius: 20px;
        background: rgba(255,255,255,0.06);
        border: none;
        color: rgba(255,255,255,0.6);
        font-size: 0.8rem;
        cursor: pointer;
        white-space: nowrap;
        transition: 0.2s;
    }
    .chat-folder-tab i {
        font-size: 0.85rem;
    }
    .chat-folder-tab.active {
        background: var(--chat-accent, #68d391);
        color: #000;
        font-weight: 600;
    }
    .chat-folder-tab:active {
        transform: scale(0.95);
    }
    /* Tabs-only mode: show folder tabs as a thin bar at top with product grid below */
    .chat-list-panel.tabs-only {
        height: auto;
        bottom: auto;
        z-index: 25;
        border-bottom: 1px solid var(--chat-border);
    }
    .chat-list-panel.tabs-only .chat-list-header {
        padding: 0;
        border-bottom: none;
    }
    .chat-list-panel.tabs-only .chat-list-header > div:first-child,
    .chat-list-panel.tabs-only .chat-list-search {
        display: none !important;
    }
    .chat-list-panel.tabs-only .chat-list-items {
        display: none !important;
    }
    .chat-list-panel.tabs-only ~ .chat-window.show {
        top: 48px;
    }
}

/* Product card inside chat messages */
/* ===== POST LAYOUT (Telegram-style) ===== */

.post {
    background: rgba(255,255,255,0.04);
    border-radius: 10px; overflow: hidden;
    max-width: 360px; margin-top: 6px;
}
.message.incoming:has(.post) {
    border: 2.5px solid #2a7fff;
    max-width: 100%;
    background: transparent;
    padding: 0;
    border-radius: 0;
    align-self: center;
}
.message.incoming .post {
    max-width: 100%;
    margin-top: 0;
    border-radius: 0;
    background: rgba(255,255,255,0.04);
    border: none;
}
.message.incoming .post .post-video,
.message.incoming .post .post-video video,
.message.incoming .post .post-images,
.message.incoming .post .post-images .post-img,
.message.incoming .post .post-images .post-img img {
    border-radius: 0;
}

.post-header {
    padding: 8px 10px 4px;
    display: flex; align-items: center; gap: 8px;
}
.post-title {
    font-size: 0.82rem; font-weight: 600;
    color: var(--chat-accent); white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
}

.post-media {
    display: flex; flex-direction: column; gap: 2px;
}

.post-videos-stack {
    display: flex; flex-direction: column; gap: 2px;
}
.post-video {
    position: relative; cursor: pointer;
    background: #000; max-height: 280px; overflow: hidden;
}
.post-video video {
    width: 100%; display: block;
    max-height: 280px; object-fit: cover;
}
.post-play-btn {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    pointer-events: none;
}
.post-play-btn i {
    font-size: 2.2rem; color: rgba(255,255,255,0.8);
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
    transition: 0.2s;
}

.post-images {
    display: flex; gap: 2px;
}
.post-images.single {
    flex-direction: column;
}
.post-images.two {
    flex-direction: row;
}
.post-images .post-img {
    flex: 1; cursor: pointer; overflow: hidden;
    background: #111; min-height: 100px;
    display: flex; align-items: center; justify-content: center;
}
.post-images .post-img img {
    width: 100%; height: 100%; object-fit: cover;
    display: block; transition: 0.2s;
}
.post-images .post-img:active img {
    transform: scale(1.05);
}

.post-content {
    padding: 6px 10px 10px;
}
.post-content .msg-sender {
    text-align: right; margin-top: 6px; color: #fff;
}
.post-text {
    font-size: 0.82rem; line-height: 1.5;
    color: var(--chat-text);
    white-space: pre-wrap; word-break: break-word;
}

/* ===== GALLERY OVERLAY ===== */

.gallery-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,0.92);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.25s ease;
}
.gallery-overlay.active {
    opacity: 1; pointer-events: auto;
}
.gallery-overlay .gallery-img {
    max-width: 95vw; max-height: 95vh;
    object-fit: contain; border-radius: 4px;
}
.gallery-overlay .gallery-close {
    position: absolute; top: 16px; right: 20px;
    color: #fff; font-size: 2rem; cursor: pointer;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.5); border-radius: 50%;
    z-index: 1;
}

/* Video fullscreen overlay */
.video-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,0.95);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.25s ease;
}
.video-overlay.active {
    opacity: 1; pointer-events: auto;
}
.video-overlay-player {
    width: 100%; height: 100%;
    object-fit: contain;
}
.video-overlay .gallery-close {
    position: absolute; top: 16px; right: 20px;
    color: #fff; font-size: 2.2rem; cursor: pointer;
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.6); border-radius: 50%;
    z-index: 10;
}

/* Hide chat list sidebar */
.chat-list-panel {
    display: none !important;
}

/* Mobile back button (hidden on desktop) */
.chat-mobile-back {
    display: none;
    background: none;
    border: none;
    color: var(--chat-text, #e0e0e0);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px;
    margin-right: 4px;
    align-items: center;
    justify-content: center;
}
.chat-mobile-back:active {
    opacity: 0.6;
}
