/* HooBook Messaging Panel & Full Page CSS */

.message-bell {
    position: relative;
    font-size: 22px;
    margin-left: 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.message-bell i {
    color: #333;
    font-size: 22px;
}

html.dark .message-bell i {
    color: #ffce00;
}

.message-count {
    position: absolute;
    top: -6px;
    right: -10px;
    background: #3b82f6;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 18px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, .2);
}

.message-count.show {
    display: inline-flex;
}

.msg-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .4);
    z-index: 1199;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
}

.msg-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.msg-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: min(420px, 92vw);
    height: 100dvh;
    background: #fff;
    z-index: 1200;
    transform: translateX(100%);
    transition: transform .35s cubic-bezier(.4, 0, .2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 32px rgba(0, 0, 0, .18);
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

.msg-panel.open {
    transform: translateX(0);
}

html.dark .msg-panel {
    background: #1d1f24;
    box-shadow: -8px 0 32px rgba(0, 0, 0, .6);
}

.msg-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, .08);
    flex-shrink: 0;
}

html.dark .msg-panel-header {
    border-bottom-color: rgba(255, 255, 255, .1);
}

.msg-panel-header h2 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #222;
}

html.dark .msg-panel-header h2 {
    color: #eee;
}

.msg-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.msg-header-btn {
    background: none;
    border: 1px solid rgba(0, 0, 0, .1);
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 14px;
    color: #444;
    transition: background .2s;
}

.msg-header-btn:hover {
    background: rgba(0, 0, 0, .05);
}

html.dark .msg-header-btn {
    border-color: rgba(255, 255, 255, .12);
    color: #ccc;
}

.msg-conv-list {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.msg-conv-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid rgba(0, 0, 0, .05);
    transition: background .15s;
}

.msg-conv-item:hover {
    background: rgba(0, 0, 0, .03);
}

.msg-conv-item.unread {
    background: rgba(59, 130, 246, .06);
}

html.dark .msg-conv-item {
    border-bottom-color: rgba(255, 255, 255, .06);
}

html.dark .msg-conv-item:hover {
    background: rgba(255, 255, 255, .04);
}

html.dark .msg-conv-item.unread {
    background: rgba(96, 165, 250, .1);
}

.msg-conv-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: #e2e8f0;
}

.msg-conv-info {
    flex: 1;
    min-width: 0;
}

.msg-conv-name {
    font-weight: 600;
    font-size: 15px;
    color: #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

html.dark .msg-conv-name {
    color: #eee;
}

.msg-conv-preview {
    font-size: 13px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

html.dark .msg-conv-preview {
    color: #aaa;
}

.msg-conv-meta {
    text-align: right;
    flex-shrink: 0;
}

.msg-conv-time {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
}

html.dark .msg-conv-time {
    color: #888;
}

.msg-conv-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #3b82f6;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    margin-top: 4px;
}

.msg-empty {
    padding: 40px 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

html.dark .msg-empty {
    color: #777;
}

.msg-chat-view {
    display: none;
    flex-direction: column;
    height: 100%;
}

.msg-chat-view.active {
    display: flex;
}

.msg-chat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(0, 0, 0, .08);
    flex-shrink: 0;
}

html.dark .msg-chat-header {
    border-bottom-color: rgba(255, 255, 255, .1);
}

.msg-chat-back {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    color: #444;
    border-radius: 6px;
}

.msg-chat-back:hover {
    background: rgba(0, 0, 0, .06);
}

html.dark .msg-chat-back {
    color: #ccc;
}

.msg-chat-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    background: #e2e8f0;
}

.msg-chat-name {
    font-weight: 600;
    font-size: 15px;
    color: #222;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

html.dark .msg-chat-name {
    color: #eee;
}

.msg-chat-fullpage {
    background: none;
    border: 1px solid rgba(0, 0, 0, .1);
    border-radius: 6px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 13px;
    color: #666;
}

html.dark .msg-chat-fullpage {
    border-color: rgba(255, 255, 255, .12);
    color: #aaa;
}

/* =========================================
   MESAJ BALONLARI - DAHA TEMİZ VE MODERN
========================================= */

.msg-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 14px 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overscroll-behavior: contain;
}

.msg-bubble-wrap {
    display: flex;
    flex-direction: column;
    max-width: min(82%, 340px);
    gap: 4px;
}

.msg-bubble-wrap.mine {
    align-self: flex-end;
    align-items: flex-end;
}

.msg-bubble-wrap.theirs {
    align-self: flex-start;
    align-items: flex-start;
}

.msg-bubble-sender {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 1px;
    padding: 0 10px;
    line-height: 1.3;
}

html.dark .msg-bubble-sender {
    color: #9ca3af;
}

.msg-bubble {
    position: relative;
    padding: 10px 14px;
    border-radius: 18px;
    line-height: 1.5;
    font-size: 14px;
    word-break: break-word;
    overflow-wrap: anywhere;
    box-sizing: border-box;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    transition: background .2s ease, box-shadow .2s ease, transform .2s ease;
}

.msg-bubble-wrap.mine .msg-bubble {
    background: linear-gradient(180deg, #3b82f6, #2563eb);
    color: #ffffff;
    border-bottom-right-radius: 6px;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}

.msg-bubble-wrap.theirs .msg-bubble {
    background: #f3f4f6;
    color: #111827;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-bottom-left-radius: 6px;
}

html.dark .msg-bubble-wrap.mine .msg-bubble {
    background: linear-gradient(180deg, #2563eb, #1d4ed8);
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.2);
}

html.dark .msg-bubble-wrap.theirs .msg-bubble {
    background: #2a2d35;
    color: #f3f4f6;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.msg-bubble:hover {
    transform: translateY(-1px);
}

.msg-bubble p {
    margin: 0;
}

.msg-bubble-time {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    margin-top: 2px;
    padding: 0 10px;
    line-height: 1.2;
}

.msg-bubble-wrap.mine .msg-bubble-time {
    color: #93c5fd;
}

.msg-bubble-wrap.theirs .msg-bubble-time {
    color: #9ca3af;
}

html.dark .msg-bubble-wrap.mine .msg-bubble-time {
    color: #93c5fd;
}

html.dark .msg-bubble-wrap.theirs .msg-bubble-time {
    color: #6b7280;
}

.msg-read-tick {
    font-size: 11px;
    margin-left: 2px;
}

.msg-read-tick.read {
    color: #bfdbfe;
}

.msg-read-tick.sent {
    color: rgba(255, 255, 255, 0.7);
}

.msg-system {
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
    padding: 10px 0 4px;
    font-style: italic;
}

html.dark .msg-system {
    color: #6b7280;
}

/* Story card olan mesajlarda normal bubble görünümü kalksın */
.msg-bubble:has(.msg-story-card) {
    padding: 0;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Story card içeren wrap daha doğal dursun */
.msg-bubble-wrap:has(.msg-story-card) {
    max-width: min(82%, 300px);
}

.msg-bubble-wrap.mine:has(.msg-story-card),
.msg-bubble-wrap.theirs:has(.msg-story-card) {
    gap: 6px;
}

/* Mobil görünüm */
@media (max-width: 768px) {
    .msg-chat-messages {
        padding: 14px 10px 8px;
        gap: 8px;
    }

    .msg-bubble-wrap {
        max-width: min(88%, 300px);
    }

    .msg-bubble {
        padding: 9px 12px;
        font-size: 13.5px;
        border-radius: 16px;
    }

    .msg-bubble-sender {
        padding: 0 8px;
        font-size: 11.5px;
    }

    .msg-bubble-time {
        padding: 0 8px;
        font-size: 10.5px;
    }

    .msg-bubble-wrap:has(.msg-story-card) {
        max-width: min(88%, 280px);
    }
}

.msg-read-tick {
    font-size: 11px;
    margin-left: 4px;
}

.msg-read-tick.read {
    color: #3b82f6;
}

.msg-read-tick.sent {
    color: #aaa;
}

.msg-system {
    text-align: center;
    font-size: 12px;
    color: #999;
    padding: 8px 0;
    font-style: italic;
}

html.dark .msg-system {
    color: #777;
}

.msg-story-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .14);
    border-color: rgba(59, 130, 246, .28);
}


.msg-story-card-info {
    padding: 12px 14px 14px;
}

.msg-story-card-info h4 {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    color: #111827;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

html.dark .msg-story-card-info h4 {
    color: #f3f4f6;
}



html.dark .msg-story-card-info p {
    color: #9ca3af;
}

.msg-input-bar {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 10px 14px;
    border-top: 1px solid rgba(0, 0, 0, .08);
    flex-shrink: 0;
    background: #fff;
}

html.dark .msg-input-bar {
    background: #1d1f24;
    border-top-color: rgba(255, 255, 255, .1);
}

.msg-input-bar textarea {
    flex: 1;
    resize: none;
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 20px;
    padding: 10px 16px;
    font-size: 14px;
    font-family: inherit;
    max-height: 120px;
    outline: none;
    background: #f5f5f5;
    color: #222;
    line-height: 1.4;
}

.msg-input-bar textarea:focus {
    border-color: #3b82f6;
}

html.dark .msg-input-bar textarea {
    background: #2a2d35;
    color: #eee;
    border-color: rgba(255, 255, 255, .12);
}

html.dark .msg-input-bar textarea:focus {
    border-color: #60a5fa;
}

.msg-input-bar textarea::placeholder {
    color: #aaa;
}

html.dark .msg-input-bar textarea::placeholder {
    color: #777;
}

.msg-share-story-btn {
    background: none;
    border: 1px solid rgba(0, 0, 0, .1);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    cursor: pointer;
    font-size: 18px;
    color: #666;
    flex-shrink: 0;
}

html.dark .msg-share-story-btn {
    border-color: rgba(255, 255, 255, .12);
    color: #aaa;
}

.msg-send-btn {
    background: #3b82f6;
    border: none;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    cursor: pointer;
    color: #fff;
    font-size: 18px;
    flex-shrink: 0;
}

.msg-send-btn:hover {
    background: #2563eb;
}

.msg-send-btn:disabled {
    background: #93c5fd;
    cursor: not-allowed;
}

.msg-story-search-popup {
    position: absolute;
    bottom: 60px;
    left: 14px;
    right: 14px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .1);
    border-radius: 12px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, .12);
    padding: 12px;
    z-index: 10;
    display: none;
}

.msg-story-search-popup.open {
    display: block;
}

html.dark .msg-story-search-popup {
    background: #2a2d35;
    border-color: rgba(255, 255, 255, .1);
}

.msg-story-search-popup input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid rgba(0, 0, 0, .1);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    background: #f5f5f5;
    color: #222;
    box-sizing: border-box;
}

html.dark .msg-story-search-popup input {
    background: #1d1f24;
    color: #eee;
    border-color: rgba(255, 255, 255, .1);
}

.msg-story-search-results {
    max-height: 200px;
    overflow-y: auto;
    margin-top: 8px;
}

.msg-story-search-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
}

.msg-story-search-item:hover {
    background: rgba(0, 0, 0, .04);
}

html.dark .msg-story-search-item:hover {
    background: rgba(255, 255, 255, .06);
}

.msg-story-search-item img {
    width: 40px;
    height: 56px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

.msg-story-search-item span {
    font-size: 14px;
    color: #333;
}

html.dark .msg-story-search-item span {
    color: #ddd;
}

.msg-new-chat-view {
    display: none;
    flex-direction: column;
    height: 100%;
}

.msg-new-chat-view.active {
    display: flex;
}

.msg-new-chat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(0, 0, 0, .08);
}

html.dark .msg-new-chat-header {
    border-bottom-color: rgba(255, 255, 255, .1);
}

.msg-new-chat-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    flex: 1;
    color: #222;
}

html.dark .msg-new-chat-header h3 {
    color: #eee;
}

.msg-new-search {
    padding: 12px 14px;
}

.msg-new-search input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    background: #f5f5f5;
    color: #222;
    box-sizing: border-box;
}

html.dark .msg-new-search input {
    background: #2a2d35;
    color: #eee;
    border-color: rgba(255, 255, 255, .12);
}

.msg-user-results {
    flex: 1;
    overflow-y: auto;
    padding: 0 14px;
}

.msg-user-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 8px;
    border-radius: 10px;
    cursor: pointer;
}

.msg-user-result-item:hover {
    background: rgba(0, 0, 0, .04);
}

html.dark .msg-user-result-item:hover {
    background: rgba(255, 255, 255, .06);
}

.msg-user-result-item img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    background: #e2e8f0;
}

.msg-user-result-item span {
    font-size: 15px;
    font-weight: 500;
    color: #222;
}

html.dark .msg-user-result-item span {
    color: #eee;
}

@media (max-width:768px) {
    .msg-panel {
        width: 100vw;
    }

    .message-bell {
        margin: 0;
        padding: 0;
    }

    .message-bell>span {
        position: relative;
        display: flex;
        align-items: center;
        border: 1px solid var(--divider);
        border-radius: 12px;
        padding: 12px 16px;
        cursor: pointer;
    }

    .message-bell i {
        font-size: 22px;
        line-height: 1;
    }

    .message-count {
        position: absolute;
        top: 6px;
        right: 10px;
    }
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
}

.msg-fullpage {
    display: flex;
    top: var(--header-h, 56px);
    left: 0;
    right: 0;
    height: calc(100dvh - var(--header-h, 56px));
}

html.dark .msg-fullpage {
    background: #1d1f24;
}

.msg-fp-sidebar {
    width: 340px;
    border-right: 1px solid rgba(0, 0, 0, .08);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

html.dark .msg-fp-sidebar {
    border-right-color: rgba(255, 255, 255, .1);
}

.msg-fp-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.msg-fp-empty {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 15px;
}

@media (max-width:768px) {
    .msg-fp-sidebar {
        width: 100%;
    }

    .msg-fp-sidebar.hidden-mobile {
        display: none;
    }

    .msg-fp-main.hidden-mobile {
        display: none;
    }
}


/* =========================================
   HİKAYE KARTI (STORY CARD) MODERN TASARIM
========================================= */

.msg-story-card {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 12px;
    border-radius: 16px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;

    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow:
        0 8px 24px rgba(15, 23, 42, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);

    color: #111827;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease;
}

.msg-story-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: none;
    pointer-events: none;
}

/* Benim / karşı taraf fark etmeden kart aynı düzgün yapıda kalsın */
.msg-bubble-wrap.mine .msg-story-card,
.msg-bubble-wrap.theirs .msg-story-card {
    width: 100%;
    max-width: 100%;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow:
        0 8px 24px rgba(15, 23, 42, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.75);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

html.dark .msg-bubble-wrap.mine .msg-story-card,
html.dark .msg-bubble-wrap.theirs .msg-story-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.msg-story-card:hover {
    transform: translateY(-2px);
    background: #fafafa;
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow:
        0 12px 28px rgba(15, 23, 42, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

html.dark .msg-bubble-wrap.mine .msg-story-card:hover,
html.dark .msg-bubble-wrap.theirs .msg-story-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}

.msg-story-card img {
    width: 56px;
    height: 78px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
}

.msg-story-card-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.msg-story-card-info h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.15px;
    color: #111827;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.msg-story-card-info p {
    margin: 0;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.45;
    color: #4b5563;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

html.dark .msg-story-card-info h4 {
    color: #f3f4f6;
}

html.dark .msg-story-card-info p {
    color: #cbd5e1;
}

/* Story card varsa mavi mesaj balonunu kaldır */
.msg-bubble-wrap.mine .msg-bubble:has(.msg-story-card),
.msg-bubble-wrap.theirs .msg-bubble:has(.msg-story-card) {
    background: transparent;
    box-shadow: none;
    padding: 0;
    color: inherit;
}

/* Story card içeren bubble genişleyebilsin ama taşmasın */
.msg-bubble-wrap:has(.msg-story-card) {
    width: min(100%, 300px);
    max-width: 100%;
}

/* Sağ panel için özel ince ayar */
.msg-panel .msg-bubble-wrap:has(.msg-story-card),
.msg-chat-view .msg-bubble-wrap:has(.msg-story-card) {
    width: min(100%, 280px);
}

/* Tam sayfada biraz daha geniş olabilir */
.msg-fullpage .msg-bubble-wrap:has(.msg-story-card),
.msg-fp-main .msg-bubble-wrap:has(.msg-story-card) {
    width: min(100%, 340px);
}

/* Küçük ekran / dar panel düzeltmesi */
@media (max-width: 768px) {
    .msg-story-card {
        gap: 10px;
        padding: 10px;
        border-radius: 14px;
    }

    .msg-story-card img {
        width: 50px;
        height: 70px;
        border-radius: 8px;
    }

    .msg-story-card-info h4 {
        font-size: 13.5px;
    }

    .msg-story-card-info p {
        font-size: 12px;
    }

    .msg-panel .msg-bubble-wrap:has(.msg-story-card),
    .msg-chat-view .msg-bubble-wrap:has(.msg-story-card),
    .msg-fullpage .msg-bubble-wrap:has(.msg-story-card),
    .msg-fp-main .msg-bubble-wrap:has(.msg-story-card) {
        width: min(100%, 100%);
    }
}



/* Scrollbar */
.msg-conv-list,
.msg-chat-messages,
.msg-user-results,
.msg-story-search-results,
#dmShareUserResults,
#fpConvList,
#fpChatMessages,
#fpUserResults,
#fpStoryResults {
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 116, 139, .55) transparent;
}

.msg-conv-list::-webkit-scrollbar,
.msg-chat-messages::-webkit-scrollbar,
.msg-user-results::-webkit-scrollbar,
.msg-story-search-results::-webkit-scrollbar,
#dmShareUserResults::-webkit-scrollbar,
#fpConvList::-webkit-scrollbar,
#fpChatMessages::-webkit-scrollbar,
#fpUserResults::-webkit-scrollbar,
#fpStoryResults::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.msg-conv-list::-webkit-scrollbar-track,
.msg-chat-messages::-webkit-scrollbar-track,
.msg-user-results::-webkit-scrollbar-track,
.msg-story-search-results::-webkit-scrollbar-track,
#dmShareUserResults::-webkit-scrollbar-track,
#fpConvList::-webkit-scrollbar-track,
#fpChatMessages::-webkit-scrollbar-track,
#fpUserResults::-webkit-scrollbar-track,
#fpStoryResults::-webkit-scrollbar-track {
    background: transparent;
}

.msg-conv-list::-webkit-scrollbar-thumb,
.msg-chat-messages::-webkit-scrollbar-thumb,
.msg-user-results::-webkit-scrollbar-thumb,
.msg-story-search-results::-webkit-scrollbar-thumb,
#dmShareUserResults::-webkit-scrollbar-thumb,
#fpConvList::-webkit-scrollbar-thumb,
#fpChatMessages::-webkit-scrollbar-thumb,
#fpUserResults::-webkit-scrollbar-thumb,
#fpStoryResults::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, .55);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.msg-conv-list::-webkit-scrollbar-thumb:hover,
.msg-chat-messages::-webkit-scrollbar-thumb:hover,
.msg-user-results::-webkit-scrollbar-thumb:hover,
.msg-story-search-results::-webkit-scrollbar-thumb:hover,
#dmShareUserResults::-webkit-scrollbar-thumb:hover,
#fpConvList::-webkit-scrollbar-thumb:hover,
#fpChatMessages::-webkit-scrollbar-thumb:hover,
#fpUserResults::-webkit-scrollbar-thumb:hover,
#fpStoryResults::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 116, 139, .78);
    background-clip: padding-box;
}

html.dark .msg-conv-list,
html.dark .msg-chat-messages,
html.dark .msg-user-results,
html.dark .msg-story-search-results,
html.dark #dmShareUserResults,
html.dark #fpConvList,
html.dark #fpChatMessages,
html.dark #fpUserResults,
html.dark #fpStoryResults {
    scrollbar-color: rgba(148, 163, 184, .38) transparent;
}

html.dark .msg-conv-list::-webkit-scrollbar-thumb,
html.dark .msg-chat-messages::-webkit-scrollbar-thumb,
html.dark .msg-user-results::-webkit-scrollbar-thumb,
html.dark .msg-story-search-results::-webkit-scrollbar-thumb,
html.dark #dmShareUserResults::-webkit-scrollbar-thumb,
html.dark #fpConvList::-webkit-scrollbar-thumb,
html.dark #fpChatMessages::-webkit-scrollbar-thumb,
html.dark #fpUserResults::-webkit-scrollbar-thumb,
html.dark #fpStoryResults::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, .3);
    border: 2px solid transparent;
    background-clip: padding-box;
}

html.dark .msg-conv-list::-webkit-scrollbar-thumb:hover,
html.dark .msg-chat-messages::-webkit-scrollbar-thumb:hover,
html.dark .msg-user-results::-webkit-scrollbar-thumb:hover,
html.dark .msg-story-search-results::-webkit-scrollbar-thumb:hover,
html.dark #dmShareUserResults::-webkit-scrollbar-thumb:hover,
html.dark #fpConvList::-webkit-scrollbar-thumb:hover,
html.dark #fpChatMessages::-webkit-scrollbar-thumb:hover,
html.dark #fpUserResults::-webkit-scrollbar-thumb:hover,
html.dark #fpStoryResults::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, .5);
    background-clip: padding-box;
}