/* ==============================================================================
   CHAT SERVICE VOOR VOLWASSENEN (18+) - MODERN LUXURY DARK THEME
   ============================================================================== */

:root {
    --bg-darkest: #07090e;
    --bg-darker: #0d111a;
    --bg-surface: #131b2a;
    --bg-surface-elevated: #1a2438;
    --bg-surface-hover: #22304a;
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-accent: rgba(225, 29, 72, 0.4);

    --primary: #e11d48;         /* Crimson Adult Accent */
    --primary-hover: #f43f5e;
    --primary-glow: rgba(225, 29, 72, 0.4);
    
    --accent-purple: #a855f7;    /* Velvet Purple */
    --accent-purple-glow: rgba(168, 85, 247, 0.4);

    --accent-cyan: #06b6d4;
    --accent-gold: #f59e0b;

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    --font-main: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --shadow-soft: 0 4px 20px -2px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(225, 29, 72, 0.25);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-darkest);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* --- Layout Container --- */
.app-container {
    display: grid;
    grid-template-columns: 280px 1fr 260px;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

/* Mobile Drawers Backdrop Overlay */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 85;
    opacity: 0;
    transition: opacity 0.25s ease;
    cursor: pointer;
    pointer-events: none;
}

.sidebar-backdrop.active {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

/* Standaard & Desktop (> 768px): Verberg mobiele knoppen en backdrop overlay VOLLEDIG */
.mobile-toggle-btn,
.btn-hamburger-toggle,
#mobileMenuBtn,
#mobileUsersBtn,
.mobile-close-users-btn,
.mobile-close-rooms-btn {
    display: none !important;
}

/* Desktop / Web versie: Geen backdrop, geen blur, geen mobiele knoppen */
@media (min-width: 769px) {
    .sidebar-backdrop,
    .sidebar-backdrop.active {
        display: none !important;
        opacity: 0 !important;
        pointer-events: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    .mobile-toggle-btn,
    .btn-hamburger-toggle,
    #mobileMenuBtn,
    #mobileUsersBtn,
    .mobile-close-users-btn,
    .mobile-close-rooms-btn {
        display: none !important;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .app-container {
        grid-template-columns: 240px 1fr 220px;
    }
    .users-sidebar {
        display: flex !important;
    }
}

@media (max-width: 768px) {
    .app-container {
        grid-template-columns: 1fr;
        height: var(--app-height, 100dvh) !important;
        max-height: var(--app-height, 100dvh) !important;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: auto;
        width: 100vw;
    }
    .mobile-toggle-btn {
        display: inline-flex !important;
        align-items: center;
        gap: 4px;
    }
    .btn-hamburger-toggle {
        display: inline-flex !important;
        width: 38px !important;
        height: 38px !important;
        align-items: center;
        justify-content: center;
        font-size: 1.25rem !important;
        flex-shrink: 0;
        cursor: pointer;
    }
    .mobile-close-users-btn,
    .mobile-close-rooms-btn {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }
    .rooms-sidebar {
        position: fixed !important;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 100;
        width: 310px;
        max-width: 86vw;
        height: var(--app-height, 100dvh) !important;
        max-height: var(--app-height, 100dvh) !important;
        background: #0b0f17 !important;
        box-shadow: 10px 0 40px rgba(0, 0, 0, 0.9);
        transform: translateX(-100%);
        transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
        display: flex !important;
    }
    .rooms-sidebar.mobile-open {
        transform: translateX(0);
    }

    .users-sidebar {
        position: fixed !important;
        top: 0;
        bottom: 0;
        right: 0;
        z-index: 100;
        width: 290px;
        max-width: 84vw;
        height: var(--app-height, 100dvh) !important;
        max-height: var(--app-height, 100dvh) !important;
        background: #0b0f17 !important;
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.9);
        transform: translateX(100%);
        transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
        display: flex !important;
    }
    .users-sidebar.mobile-open {
        transform: translateX(0);
    }

    /* Safe Area insets voor mobiele drawermenu's (PWA / WebApp) */
    .brand-header {
        padding-top: calc(14px + env(safe-area-inset-top, 0px)) !important;
        padding-left: max(18px, env(safe-area-inset-left, 0px)) !important;
    }

    .users-header {
        padding-top: calc(16px + env(safe-area-inset-top, 0px)) !important;
        padding-right: max(16px, env(safe-area-inset-right, 0px)) !important;
    }

    .user-profile-strip {
        padding-bottom: max(14px, env(safe-area-inset-bottom, 14px)) !important;
        padding-left: max(14px, env(safe-area-inset-left, 0px)) !important;
    }
}

/* --- Linker Sidebar: Kamers per Provincie --- */
.rooms-sidebar {
    background: var(--bg-darker);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.brand-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(180deg, rgba(225, 29, 72, 0.1) 0%, transparent 100%);
    min-height: 70px;
    box-sizing: border-box;
}

.brand-header.has-image-logo {
    padding: 10px 16px;
    gap: 8px;
}

.brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--accent-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: var(--shadow-glow);
    overflow: hidden;
    flex-shrink: 0;
}

.brand-icon.is-image-logo {
    width: auto !important;
    height: auto !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    overflow: visible !important;
    max-width: 100%;
}

.site-logo-image {
    max-height: 48px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.7));
    display: block;
    transition: transform 0.2s ease;
}

.site-logo-image:hover {
    transform: scale(1.02);
}

.brand-icon img:not(.site-logo-image) {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.brand-text h1 {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.3px;
    background: linear-gradient(90deg, #fff, #fda4af);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.brand-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    background: #e11d48;
    color: white;
    margin-top: 3px;
    align-self: flex-start;
    letter-spacing: 0.5px;
}

.brand-badge-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
    flex-shrink: 0;
    vertical-align: middle;
}

.badge-18-img {
    height: 38px;
    width: 38px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 12px rgba(244, 63, 94, 0.45), 0 2px 6px rgba(0, 0, 0, 0.7);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
    display: block;
    cursor: default;
}

.badge-18-img:hover {
    transform: scale(1.12);
    box-shadow: 0 0 18px rgba(244, 63, 94, 0.8), 0 4px 12px rgba(0, 0, 0, 0.9);
}

.rooms-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px 10px;
}

.rooms-section-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    padding: 10px 10px 4px 10px;
}

.room-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 9px 12px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s ease;
    margin-bottom: 2px;
}

.room-btn:hover {
    background: var(--bg-surface);
    color: var(--text-primary);
}

.room-btn.active {
    background: linear-gradient(90deg, rgba(225, 29, 72, 0.22), rgba(168, 85, 247, 0.1));
    border-left: 3px solid var(--primary);
    color: #fff;
    font-weight: 600;
}

.room-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.room-icon {
    font-size: 1.1rem;
}

.room-counter {
    font-size: 0.75rem;
    padding: 2px 7px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    font-weight: 600;
}

.room-btn.active .room-counter {
    background: rgba(225, 29, 72, 0.3);
    color: #fda4af;
}

.user-profile-strip {
    padding: 12px 14px;
    border-top: 1px solid var(--border-subtle);
    background: linear-gradient(180deg, #101622 0%, #0a0e17 100%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.user-profile-main {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: opacity 0.15s;
    width: 100%;
}

.user-profile-main:hover {
    opacity: 0.9;
}

.user-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.user-avatar-small {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(225, 29, 72, 0.5);
    cursor: pointer;
    display: block;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
}

.user-status-dot {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #10b981;
    border: 2px solid #0d111a;
    box-shadow: 0 0 8px #10b981;
}

.user-info-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    cursor: pointer;
}

.user-info-name {
    font-size: 0.95rem;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
}

.user-info-sub {
    font-size: 0.74rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.user-profile-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-profile-action-admin {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #e11d48, #9f1239);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(225, 29, 72, 0.35);
    transition: all 0.15s ease;
    border: none;
}

.btn-profile-action-admin:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
}

.btn-profile-action {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--border-subtle);
    color: #cbd5e1;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-profile-action:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-profile-action.btn-logout {
    flex: 0 0 34px;
    padding: 6px 0;
    color: #f87171;
}

.btn-profile-action.btn-logout:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

/* --- Midden: Chatbox & Messages --- */
.chat-main {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    background: radial-gradient(circle at 50% 10%, rgba(225, 29, 72, 0.04) 0%, transparent 50%), var(--bg-darkest);
    position: relative;
}

.chat-header {
    height: auto;
    min-height: calc(60px + env(safe-area-inset-top, 0px));
    flex-shrink: 0;
    padding: 0 16px;
    padding-top: env(safe-area-inset-top, 0px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(13, 17, 26, 0.92);
    backdrop-filter: blur(12px);
    z-index: 20;
    position: sticky;
    top: 0;
    box-sizing: border-box;
}

.chat-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.chat-room-heading {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    cursor: default;
}

.chat-room-title {
    font-size: 1.12rem;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.chat-room-desc {
    font-size: 0.76rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

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

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.15s ease;
}

.btn-icon:hover {
    background: var(--bg-surface-elevated);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-badge-admin {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #ef4444, #991b1b);
    border: none;
    color: white;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.35);
    transition: transform 0.15s;
}

.btn-badge-admin:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
}

/* --- EVENT AANKONDIGING BANNER (TOP) --- */
.chat-event-banner {
    background: linear-gradient(90deg, #831843 0%, #4c1d95 60%, #1e1b4b 100%);
    padding: 9px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #fff;
    font-size: 0.84rem;
    font-weight: 600;
    z-index: 15;
    box-shadow: 0 3px 12px rgba(0,0,0,0.4);
    border-bottom: 1px solid rgba(244, 63, 94, 0.3);
}

.chat-event-banner-text {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.btn-event-pill {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}

.btn-event-pill:hover {
    background: rgba(255, 255, 255, 0.35);
}

/* --- VASTGEZET BERICHT STICKY BANNER (PINNED) --- */
.chat-pinned-banner {
    background: linear-gradient(90deg, #182229 0%, #202c33 100%);
    border-bottom: 1px solid rgba(251, 191, 36, 0.3);
    padding: 8px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    z-index: 14;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: background 0.15s;
}

.chat-pinned-banner:hover {
    background: #26353d;
}

.pinned-content-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 0.84rem;
    color: #fef08a;
}

.pinned-unpin-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 2px 6px;
    font-size: 0.9rem;
    border-radius: 4px;
}
.pinned-unpin-btn:hover {
    color: #ef4444;
}

/* --- ONDERHOUDSMODUS VERGRENDELINGS BANNER --- */
.maintenance-lock-banner {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.25) 0%, rgba(127, 29, 29, 0.4) 100%);
    border-bottom: 2px solid #ef4444;
    padding: 10px 18px;
    z-index: 25;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
    animation: pulseMaintenanceBanner 3s infinite alternate ease-in-out;
}

@keyframes pulseMaintenanceBanner {
    0% { background-color: rgba(239, 68, 68, 0.2); }
    100% { background-color: rgba(239, 68, 68, 0.35); }
}

.maintenance-lock-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.maintenance-lock-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.maintenance-lock-text {
    font-size: 0.88rem;
    color: #fecaca;
    line-height: 1.35;
}

.maintenance-lock-text strong {
    color: #fff;
    margin-right: 6px;
}

/* --- CHAT BERICHTEN VLOEI (WHATSAPP LUXURY DARK THEME) --- */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background-color: #0b141a;
    background-image: 
        radial-gradient(rgba(244, 63, 94, 0.035) 1px, transparent 0),
        radial-gradient(rgba(255, 255, 255, 0.02) 1px, #0b141a 1px);
    background-size: 26px 26px;
    background-position: 0 0, 13px 13px;
    position: relative;
}

/* Algemene Message Card Container */
.message-card {
    display: flex;
    gap: 10px;
    max-width: 82%;
    position: relative;
    transition: transform 0.15s ease;
    margin-bottom: 2px;
}

/* Inkomend bericht (andere leden) -> Links uitgelijnd, Donker Antraciet */
.message-card.incoming {
    align-self: flex-start;
    flex-direction: row;
}

.message-card.incoming .message-bubble {
    background: var(--chat-bubble-other, #202c33);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px 12px 12px 2px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
    padding: 7px 12px 6px 12px;
    color: #e9edef;
}

/* Uitgaand bericht (eigen account) -> Rechts uitgelijnd */
.message-card.outgoing {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-card.outgoing .message-bubble {
    background: var(--chat-bubble-self, #005c4b);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px 12px 2px 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
    padding: 7px 12px 6px 12px;
    color: #e9edef;
}

/* Privé Fluistering */
.message-card.message-whisper .message-bubble {
    background: #2d1a3d !important;
    border: 1px solid rgba(168, 85, 247, 0.5) !important;
}

.message-bubble {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 130px;
    max-width: 100%;
    word-break: break-word;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    cursor: pointer;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    align-self: flex-end;
}

.message-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 3px;
    flex-wrap: wrap;
}

.message-sender {
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.2;
}

.message-content {
    font-size: 0.92rem;
    line-height: 1.4;
    color: #f1f5f9;
    word-break: break-word;
}

/* Foto in Chat Bericht */
.message-photo-box {
    margin: 4px 0 6px 0;
    border-radius: 8px;
    overflow: hidden;
    max-width: 340px;
    cursor: pointer;
    background: rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.08);
    position: relative;
}

.message-photo-img {
    width: 100%;
    height: auto;
    max-height: 280px;
    object-fit: cover;
    display: block;
    border-radius: 8px;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.message-photo-box:hover .message-photo-img {
    transform: scale(1.02);
    filter: brightness(1.08);
}

.message-photo-verified-badge {
    position: absolute;
    bottom: 6px;
    left: 6px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(16, 185, 129, 0.5);
    color: #6ee7b7;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    backdrop-filter: blur(4px);
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

/* Tijd & Status Vinkjes (WhatsApp stijl) */
.message-footer-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 3px;
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1;
}

.message-ticks {
    color: #53bdeb; /* WhatsApp sky blue dubbele vinkjes */
    font-size: 0.72rem;
    font-weight: 800;
}

.message-system {
    text-align: center;
    font-size: 0.78rem;
    color: #94a3b8;
    font-style: italic;
    padding: 5px 14px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    margin: 4px auto;
    max-width: 80%;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.message-actions {
    display: none;
    position: absolute;
    right: 8px;
    top: -12px;
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    padding: 2px 4px;
    z-index: 5;
}

.message-card:hover .message-actions {
    display: flex;
    gap: 4px;
}

.btn-mini-action {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 4px 6px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}

.btn-mini-action:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.btn-mini-action.action-delete:hover {
    color: #ef4444;
}

/* --- EMOJI PICKER POPOVER --- */
.emoji-picker-container {
    position: absolute;
    bottom: 80px;
    left: 20px;
    width: 340px;
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7);
    z-index: 50;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.emoji-picker-container.open {
    display: flex;
}

.emoji-tabs {
    display: flex;
    background: #090d16;
    border-bottom: 1px solid var(--border-subtle);
    padding: 4px;
    overflow-x: auto;
}

.emoji-tab-btn {
    padding: 6px 10px;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 4px;
}

.emoji-tab-btn.active, .emoji-tab-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    padding: 12px;
    max-height: 220px;
    overflow-y: auto;
}

.emoji-item {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.12s, background 0.12s;
    user-select: none;
}

.emoji-item:hover {
    background: rgba(225, 29, 72, 0.2);
    transform: scale(1.25);
}

/* Chat Input Bar */
.chat-input-bar {
    padding: 10px 16px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--border-subtle);
    background: rgba(13, 17, 26, 0.95);
    backdrop-filter: blur(12px);
    position: sticky;
    bottom: 0;
    z-index: 25;
    flex-shrink: 0;
}

.chat-input-form {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 6px 10px;
    transition: border-color 0.2s;
    width: 100%;
}

.chat-input-form:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 12px rgba(225, 29, 72, 0.2);
}

.btn-emoji-trigger {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: transform 0.15s;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-emoji-trigger:hover {
    transform: scale(1.15);
}

.btn-attach-trigger {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: transform 0.15s, opacity 0.15s;
    color: #94a3b8;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-attach-trigger:hover {
    transform: scale(1.15);
    color: #38bdf8;
}

/* Lightbox Image Modal */
.image-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.94);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    cursor: zoom-out;
}

.image-lightbox.active {
    display: flex;
}

.image-lightbox img {
    max-width: 94vw;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    object-fit: contain;
}

.chat-input-field {
    flex: 1 1 0%;
    min-width: 0;
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 0.94rem;
    font-family: inherit;
    padding: 6px 4px;
}

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

.btn-send {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--primary), #be123c);
    border: none;
    border-radius: var(--radius-md);
    color: #fff;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s ease;
    box-shadow: 0 0 10px var(--primary-glow);
}

.btn-send:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
}

/* --- Rechter Sidebar: Online Gebruikers --- */
.users-sidebar {
    background: var(--bg-darker);
    border-left: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.users-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.users-title {
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-secondary);
}

.users-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px 10px;
}

.user-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.15s;
    margin-bottom: 2px;
}

.user-item:hover {
    background: var(--bg-surface);
}

.user-avatar-wrap {
    position: relative;
    width: 34px;
    height: 34px;
}

.user-avatar-wrap img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.status-dot {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--bg-darker);
}

.status-online { background-color: #10b981; }
.status-busy { background-color: #f59e0b; }
.status-away { background-color: #6366f1; }
.status-offline { background-color: #64748b; }

.user-item-info {
    flex: 1;
    min-width: 0;
}

.user-item-name {
    font-size: 0.86rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-item-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* --- Modals & Dialogs --- */
dialog {
    border: none;
    border-radius: var(--radius-lg);
    background: var(--bg-surface-elevated);
    color: #fff;
    padding: 0;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75), 0 0 30px rgba(225, 29, 72, 0.15);
    max-width: 540px;
    width: 92vw;
    margin: auto;
    border: 1px solid var(--border-subtle);
}

dialog::backdrop {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
}

.modal-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
}

.modal-title {
    font-size: 1.15rem;
    font-weight: 800;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
}

.modal-close-btn:hover {
    color: #fff;
}

.modal-body {
    padding: 24px;
    max-height: 75vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: rgba(0, 0, 0, 0.2);
}

/* --- AUTH MODAL TABS (Inloggen / Registreren / Gast) --- */
.auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 10px;
}

.auth-tab-btn {
    flex: 1;
    padding: 10px;
    background: #0d121c;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    color: #94a3b8;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.15s;
}

.auth-tab-btn.active {
    background: linear-gradient(135deg, rgba(225, 29, 72, 0.25), rgba(168, 85, 247, 0.15));
    border-color: var(--primary);
    color: #fff;
}

/* Form inputs in modals */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: #fff;
    font-family: inherit;
    font-size: 0.92rem;
    outline: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 8px rgba(225, 29, 72, 0.3);
}

.form-textarea {
    min-height: 70px;
    resize: vertical;
}

.btn-primary {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary), #be123c);
    border: none;
    border-radius: var(--radius-sm);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.btn-secondary {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.14);
}

.btn-danger {
    padding: 10px 20px;
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    font-weight: 700;
    cursor: pointer;
}

/* 18+ Age Gate */
.age-gate-badge {
    display: inline-block;
    background: #e11d48;
    color: #fff;
    font-size: 1.8rem;
    font-weight: 900;
    width: 56px;
    height: 56px;
    line-height: 56px;
    border-radius: 50%;
    margin-bottom: 12px;
    box-shadow: 0 0 25px rgba(225, 29, 72, 0.6);
}

/* Avatar Selectie Grid */
.avatar-preset-grid {
    display: flex;
    gap: 8px;
    margin-top: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.avatar-preset-item {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid transparent;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.15s;
}

.avatar-preset-item:hover, .avatar-preset-item.selected {
    border-color: var(--primary);
    transform: scale(1.1);
}

/* --- Uitgebreid Profiel Bewerken Modal Stijlen --- */
.profile-edit-header-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 18px;
}

.profile-edit-avatar-box {
    position: relative;
    width: 68px;
    height: 68px;
    flex-shrink: 0;
}

.profile-edit-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2.5px solid var(--primary);
    box-shadow: 0 0 15px rgba(225, 29, 72, 0.4);
}

.profile-form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-tip-text {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 4px;
    display: block;
}

.form-tip-admin {
    font-size: 0.75rem;
    color: #38bdf8;
    margin-top: 4px;
    display: block;
    font-weight: 600;
}

/* ==============================================================================
   VOLLEDIG MOBIEL DESIGN (SMARTPHONES & TABLETS - WHATSAPP/IOS/ANDROID OPTIMALISATIE)
   ============================================================================== */
@media (max-width: 768px) {
    /* Viewport & Safe Area lock */
    html, body {
        height: 100%;
        margin: 0;
        padding: 0;
        overflow: hidden;
        position: fixed;
        width: 100%;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        touch-action: manipulation;
        -webkit-text-size-adjust: 100%;
    }

    .app-container {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: auto !important;
        width: 100vw !important;
        max-width: 100vw !important;
        height: var(--app-height, 100dvh) !important;
        max-height: var(--app-height, 100dvh) !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
        z-index: 10;
    }

    .chat-main {
        flex: 1 1 0% !important;
        min-height: 0 !important;
        height: 100% !important;
        max-height: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        position: relative !important;
        width: 100% !important;
    }

    /* Vaste, niet-verdwijnende Mobiele Header (Safe Area / WebApp Ready) */
    .chat-header {
        height: auto !important;
        min-height: calc(56px + env(safe-area-inset-top, 0px)) !important;
        padding: 0 10px !important;
        padding-top: env(safe-area-inset-top, 0px) !important;
        padding-left: max(10px, env(safe-area-inset-left, 0px)) !important;
        padding-right: max(10px, env(safe-area-inset-right, 0px)) !important;
        padding-bottom: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        background: #0d121c !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 30 !important;
        flex-shrink: 0 !important;
        box-sizing: border-box !important;
    }

    .chat-header-title {
        min-height: 56px;
        display: flex;
        align-items: center;
        gap: 8px;
        flex: 1;
        min-width: 0;
    }

    .chat-header-actions {
        min-height: 56px;
        display: flex;
        align-items: center;
        gap: 4px;
        flex-shrink: 0;
    }

    .btn-hamburger-toggle,
    #mobileMenuBtn {
        display: inline-flex !important;
        width: 38px !important;
        height: 38px !important;
        align-items: center;
        justify-content: center;
        font-size: 1.3rem !important;
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-sm);
        color: #fff;
        flex-shrink: 0;
    }

    .mobile-toggle-btn,
    #mobileUsersBtn {
        display: inline-flex !important;
        align-items: center;
        gap: 4px;
    }

    .chat-room-heading {
        cursor: pointer;
    }

    .chat-room-title {
        font-size: 0.96rem;
        font-weight: 800;
        line-height: 1.2;
    }

    .chat-room-desc {
        display: none; /* Verberg lange beschrijving op kleine telefoonschermen */
    }

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

    .btn-icon {
        width: 34px;
        height: 34px;
        font-size: 0.95rem;
        border-radius: 8px;
    }

    /* Banners op mobiel */
    .chat-event-banner, .chat-pinned-banner {
        padding: 6px 10px;
        font-size: 0.76rem;
        flex-shrink: 0;
    }

    /* Berichtenstroom op mobiel */
    .chat-messages {
        padding: 10px 10px 6px 10px;
        gap: 6px;
        flex: 1 1 0% !important;
        min-height: 0 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .message-card {
        max-width: 92%;
    }

    .message-avatar {
        width: 32px;
        height: 32px;
    }

    .message-bubble {
        padding: 6px 10px 5px 10px;
        font-size: 0.9rem;
    }

    .message-content {
        font-size: 0.9rem;
    }

    /* Mobiele Invoerbalk & WhatsApp-stijl Rond Zendknop - ALTIJD ZICHTBAAR BOVEN BROWSERBAR & TOETSENBORD */
    .chat-input-bar {
        position: relative !important;
        bottom: auto !important;
        flex-shrink: 0 !important;
        width: 100% !important;
        background: #0d121c !important;
        border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
        padding: 8px 10px !important;
        padding-bottom: max(10px, env(safe-area-inset-bottom, 10px)) !important;
        box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.6) !important;
        z-index: 35 !important;
        box-sizing: border-box !important;
    }

    .chat-input-form {
        gap: 6px;
        padding: 4px 8px;
        border-radius: 24px;
        background: var(--bg-surface);
        border: 1px solid rgba(255, 255, 255, 0.12);
    }

    .chat-input-field {
        font-size: 16px !important; /* CRITIEK: Voorkomt iOS auto-zoom bug */
        padding: 6px 4px;
        line-height: 1.3;
    }

    /* Voorkom iOS auto-zoom op alle mobiele formuliervelden */
    input, textarea, select {
        font-size: 16px !important;
    }

    .btn-send {
        width: 38px;
        height: 38px;
        padding: 0;
        border-radius: 50%;
        font-size: 1.1rem;
        flex-shrink: 0;
        box-shadow: 0 2px 8px var(--primary-glow);
    }

    .btn-send .send-text {
        display: none;
    }

    .btn-send .send-icon {
        display: inline-block;
        margin-left: 2px;
    }

    /* Mobiele Popovers & Modals */
    .emoji-picker-container {
        width: calc(100vw - 20px);
        left: 10px;
        right: 10px;
        bottom: 60px;
        max-height: 260px;
    }

    dialog {
        width: 95vw !important;
        max-width: 95vw !important;
        max-height: 88vh !important;
        max-height: 88dvh !important;
        border-radius: 16px !important;
        padding: 14px !important;
        margin: auto !important;
    }

    .profile-form-grid-2 {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

/* ==============================================================================
   LUXE CUSTOM UI MODAL (CONFIRM & ALERT DIALOGEN - VERVANGT BROWSER ALERTS)
   ============================================================================== */
.custom-ui-dialog {
    border: none !important;
    border-radius: 20px !important;
    background: transparent !important;
    padding: 0 !important;
    max-width: 420px !important;
    width: 90vw !important;
    box-shadow: none !important;
    outline: none !important;
    margin: auto !important;
    overflow: visible !important;
}

.custom-ui-dialog::backdrop {
    background: rgba(3, 7, 18, 0.78) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    animation: customUiFade 0.18s ease-out forwards;
}

.custom-ui-box {
    background: linear-gradient(145deg, #131b26 0%, #0c1017 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 20px !important;
    padding: 26px 22px 20px 22px !important;
    text-align: center !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 30px rgba(225, 29, 72, 0.12) !important;
    animation: customUiPop 0.22s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes customUiFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes customUiPop {
    from { opacity: 0; transform: scale(0.9) translateY(12px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.custom-ui-icon-wrap {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin: 0 auto 16px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    background: rgba(244, 63, 94, 0.12);
    border: 1px solid rgba(244, 63, 94, 0.35);
    box-shadow: 0 0 20px rgba(244, 63, 94, 0.25);
}

.custom-ui-icon-wrap.is-destructive {
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.4);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

.custom-ui-icon-wrap.is-info {
    background: rgba(56, 189, 248, 0.14);
    border-color: rgba(56, 189, 248, 0.4);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
}

.custom-ui-icon-wrap.is-success {
    background: rgba(16, 185, 129, 0.14);
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.custom-ui-icon-wrap.is-warning {
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

.custom-ui-title {
    font-size: 1.22rem !important;
    font-weight: 800 !important;
    color: #fff !important;
    margin: 0 0 8px 0 !important;
    line-height: 1.25;
}

.custom-ui-text {
    font-size: 0.92rem !important;
    color: #cbd5e1 !important;
    line-height: 1.5 !important;
    margin: 0 0 22px 0 !important;
    word-break: break-word !important;
    white-space: pre-line !important;
}

.custom-ui-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-custom-ui-cancel {
    flex: 1;
    padding: 11px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: #cbd5e1;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    font-family: inherit;
}

.btn-custom-ui-cancel:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-custom-ui-confirm {
    flex: 1;
    padding: 11px 16px;
    border-radius: 12px;
    color: #fff;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.15s, filter 0.15s;
    font-family: inherit;
}

.btn-custom-ui-confirm.is-destructive {
    background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
    border-color: rgba(244, 63, 94, 0.5);
    box-shadow: 0 4px 15px rgba(225, 29, 72, 0.4);
}

.btn-custom-ui-confirm.is-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

.btn-custom-ui-confirm:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
}

/* ==============================================================================
   GOOGLE TRANSLATE & REALTIME CHAT VERTALING
   ============================================================================== */
.goog-te-banner-frame.skiptranslate,
.goog-te-banner-frame {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
}

body {
    top: 0px !important;
    position: static !important;
}

.goog-tooltip,
.goog-tooltip:hover {
    display: none !important;
}

.goog-text-highlight {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

#google_translate_element {
    position: absolute;
    top: -9999px;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

.btn-icon.translate-active {
    color: #38bdf8 !important;
    background: rgba(56, 189, 248, 0.15) !important;
    border: 1px solid rgba(56, 189, 248, 0.4) !important;
}

/* In-line Vertaal Box onder een Chatbericht */
.message-translated-box {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed rgba(255, 255, 255, 0.15);
    font-size: 0.82rem;
    line-height: 1.4;
    animation: fadeIn 0.2s ease-out;
}

.message-translated-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.25);
    padding: 2px 7px;
    border-radius: 4px;
    margin-bottom: 3px;
}

.btn-msg-translate {
    background: transparent;
    border: none;
    padding: 0 3px;
    margin-left: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    opacity: 0.55;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.15s ease, transform 0.15s ease;
    vertical-align: middle;
}

.btn-msg-translate:hover {
    opacity: 1;
    transform: scale(1.2);
}

.message-auto-trans-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 1px 5px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
    cursor: default;
    letter-spacing: 0.5px;
}

/* ==============================================================================
   STANDALONE WEBAPP / PWA VERBETERINGEN (iOS & Android)
   ============================================================================== */
@media all and (display-mode: standalone) {
    /* Verberg de 'installeer als PWA' knop wanneer de app al als PWA draait */
    #pwaInstallHeaderBtn {
        display: none !important;
    }

    /* Extra bescherming tegen ongewenste overscroll bounce op iOS/Android standalone */
    html, body {
        overscroll-behavior-y: none;
    }
}



