/* --- BASIS --- */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    background: #111b21;
    font-family: Arial, sans-serif;
}

/* --- CHAT WRAPPER --- */
.chat-wrapper {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* --- HEADER --- */
.chat-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #202c33;
    padding: 10px;
}

.chat-header .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

/* --- AVATAR SELECTIE --- */
.avatar-select {
    display: none;
    flex-shrink: 0;
    background: #1f2c33;
    padding: 10px;
}

.avatar-select img {
    width: 60px;
    margin: 5px;
    cursor: pointer;
    border-radius: 50%;
}

/* --- CHAT BODY MET ACHTERGROND FOTO --- */
.chat-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 15px;
    background-image: url("background.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    color: white;
}

/* Donkere overlay */
.chat-body::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    pointer-events: none;
}

/* --- CHAT BUBBLES --- */
.msg {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin-bottom: 18px;
    width: 100%;
    padding: 0 6px;
    box-sizing: border-box;
    position: relative;
    z-index: 2;
}

.msg .avatar-img {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    flex-shrink: 0;
}

.bubble {
    max-width: 70%;
    padding: 10px 14px;
    border-radius: 14px;
    word-wrap: break-word;
    font-size: 15px;
    line-height: 1.4;
}

.bubble b {
    font-size: 12px;
    color: #00a884;
    display: block;
    margin-bottom: 4px;
}

.left .bubble {
    background: #202c33;
    border-bottom-left-radius: 4px;
}

.right {
    justify-content: flex-end;
}

.right .bubble {
    background: #005c4b;
    border-bottom-right-radius: 4px;
}

.right .avatar-img {
    order: 2;
}

.right .bubble {
    order: 1;
}

.bubble .sticker {
    width: 110px;
    border-radius: 10px;
}

/* --- INPUTBALK --- */
.chat-input {
    flex-shrink: 0;
    display: flex;
    gap: 8px;
    background: #202c33;
    padding: 12px;
    border-top: 1px solid #2a3942;
    position: relative;
    z-index: 3;
}

.chat-input input {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    border: none;
    background: #2a3942;
    color: white;
    font-size: 15px;
}

/* --- ICON KNOPPEN (emoji + send) --- */
.icon-btn {
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 22px;
    color: white;
    background: #00a884;

    transition: 0.2s;
}

.icon-btn:hover {
    background: #06c79a;
}

.icon-btn:active {
    background: #008f6f;
}

.send-btn {
    font-weight: bold;
}

/* --- EMOJI MENU (STICKER PANEL) --- */
.sticker-panel {
    display: none;
    background: #202c33;
    padding: 10px;
    flex-shrink: 0;
    position: relative;
    z-index: 9999;
    border-top: 1px solid #2a3942;
}

.sticker-panel img {
    width: 70px;
    height: auto;
    border-radius: 10px;
    object-fit: contain;
    cursor: pointer;
    margin: 5px;
}

/* --- ZIJMENU --- */
.side-menu {
    position: fixed;
    top: 0;
    right: -260px;
    width: 260px;
    height: 100%;
    background: #202c33;
    padding: 20px;
    box-sizing: border-box;
    transition: right 0.35s ease;
    overflow-y: auto;
    z-index: 5000;
}

.side-menu.open {
    right: 0;
}

.side-menu h3 {
    color: #00a884;
    margin-top: 20px;
    margin-bottom: 10px;
}

.side-menu button {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    background: #2a3942;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.2s;
}

.side-menu button:hover {
    background: #00a884;
    color: black;
    transform: translateX(3px);
}

/* --- HAMBURGER --- */
#hamburgerBtn {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 6000;
    background: #00a884;
    border: none;
    padding: 12px;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

/* --- GROEPSMENU --- */
.group-menu {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #1f2c33;
    padding: 20px;
    border-radius: 12px;
    z-index: 7000;
}

/* ============================================================
    TOEVOEGINGEN (NIET VERANDEREN, ALLEEN AANVULLEN)
   ============================================================ */

/* PRIVÉCHAT KNOPPEN GELIJK MAKEN AAN MENU-KNOPPEN */
.side-item {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    background: #2a3942;
    color: white;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.2s;
    border: none;
    display: block;
}

.side-item:hover {
    background: #00a884;
    color: black;
    transform: translateX(3px);
}

/* DEEL-KNOP IN HEADER */
.share-btn {
    margin-left: auto;
    background: #2a3942;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: 0.2s;
}

.share-btn:hover {
    background: #00a884;
    color: black;
    transform: scale(1.1);
}

/* QR POPUP */
.qr-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9000;
}

.qr-inner {
    background: #1f2c33;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #2a3942;
}

.qr-inner img {
    width: 220px;
    height: 220px;
    margin-bottom: 15px;
}

.qr-inner button {
    background: #2a3942;
    color: white;
    border: none;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
}

.qr-inner button:hover {
    background: #00a884;
    color: black;
}
/* PRIVÉCHAT KNOPPEN EXACT HETZELFDE ALS MENU-KNOPPEN */
.side-item {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    background: #2a3942;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.2s;
    font-size: 15px;
    text-align: left;
    display: block;
}

.side-item:hover {
    background: #00a884;
    color: black;
    transform: translateX(3px);
}
/* SHARE MENU POPUP */
#shareMenu {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #1f2c33;
    padding: 20px;
    border-radius: 12px;
    z-index: 8000;
    width: 260px;
    text-align: center;
    border: 1px solid #2a3942;
}

#shareGroupList .share-item {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    background: #2a3942;
    color: white;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.2s;
}

#shareGroupList .share-item:hover {
    background: #00a884;
    color: black;
    transform: translateX(3px);
}
/* SHARE MENU ITEMS */
.share-item {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    background: #2a3942;
    color: white;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.2s;
}

.share-item:hover {
    background: #00a884;
    color: black;
    transform: translateX(3px);
}

/* QR POPUP FIX */
.qr-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}
/* SHARE MENU POPUP */
#shareMenu {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #1f2c33;
    padding: 20px;
    border-radius: 12px;
    z-index: 99999;
    width: 260px;
    text-align: center;
    border: 1px solid #2a3942;
}

/* SHARE ITEMS */
.share-item {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    background: #2a3942;
    color: white;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.2s;
}

.share-item:hover {
    background: #00a884;
    color: black;
    transform: translateX(3px);
}

/* QR POPUP */
.qr-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
    z-index: 999999;
}

.share-item {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    background: #2a3942;
    color: white;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.2s;
}

.share-item:hover {
    background: #00a884;
    color: black;
    transform: translateX(3px);
}

.qr-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
    z-index: 99999;
}
/* SHARE MENU ITEMS */
.share-item {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    background: #2a3942;
    color: white;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.2s;
}

.share-item:hover {
    background: #00a884;
    color: black;
    transform: translateX(3px);
}

/* QR POPUP */
.qr-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
    z-index: 99999;
}
