
/* RPG Messenger v1.6 - Theme-neutral */

.rpgm-wrapper {
    border: 1px solid rgba(128,128,128,0.2);
    border-radius: 8px;
    overflow: hidden;
    margin: 15px 0;
}

/* === HEADER === */
.rpgm-header {
    padding: 20px;
    border-bottom: 1px solid rgba(128,128,128,0.15);
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Zurück-Button links */
.rpgm-header-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(128,128,128,0.3);
    border-radius: 50%;
    text-decoration: none;
    font-size: 1rem;
    opacity: 0.7;
    flex-shrink: 0;
}

.rpgm-header-back:hover {
    opacity: 1;
    background: rgba(128,128,128,0.1);
}

/* Titel & Info */
.rpgm-header-center {
    flex: 1;
}

.rpgm-header-title {
    font-size: 1.3rem;
    font-weight: normal;
    font-style: italic;
    margin: 0 0 5px 0;
}

.rpgm-header-participants {
    font-size: 0.85rem;
    margin: 0 0 3px 0;
}

.rpgm-header-participants a {
    text-decoration: none;
    margin-right: 12px;
}

.rpgm-header-date {
    font-size: 0.75rem;
    opacity: 0.6;
    margin: 0;
}

/* === ICON LEISTE (Immersiv/Dekorativ) === */
.rpgm-iconbar {
    display: flex;
    justify-content: center;
    gap: 5px;
    padding: 10px 15px;
    border-bottom: 1px solid rgba(128,128,128,0.15);
    flex-wrap: wrap;
}

.rpgm-iconbar a,
.rpgm-iconbar span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 0.8rem;
    opacity: 0.6;
    text-decoration: none;
    border-radius: 15px;
    transition: all 0.2s;
}

.rpgm-iconbar i {
    font-size: 0.9rem;
}

.rpgm-iconbar a:hover {
    opacity: 1;
    background: rgba(128,128,128,0.1);
}

.rpgm-iconbar span {
    cursor: default;
}

/* === MAIN LAYOUT === */
.rpgm-main {
    display: block;
}

/* === CHAT BEREICH === */
.rpgm-chat {
    padding: 20px;
    min-height: 350px;
}

/* === PAGINATION === */
.rpgm-pagination {
    padding: 8px 20px;
    text-align: center;
}

.rpgm-pagination--top {
    /* Kein Border - dezenter */
}

.rpgm-pagination--bottom {
    /* Kein Border - dezenter */
}

.rpgm-pagination:empty {
    display: none;
}

.rpgm-pagination .pagination {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 3px;
    font-size: 0.75rem;
    opacity: 0.6;
}

.rpgm-pagination:hover .pagination {
    opacity: 1;
}

.rpgm-pagination .pagination a,
.rpgm-pagination .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    text-decoration: none;
    transition: all 0.15s;
}

.rpgm-pagination .pagination a {
    background: transparent;
    color: inherit;
}

.rpgm-pagination .pagination a:hover {
    background: rgba(128,128,128,0.15);
}

.rpgm-pagination .pagination .pagination_current {
    background: rgba(59,130,246,0.15);
    color: #3b82f6;
    font-weight: 600;
}

.rpgm-pagination .pagination .pages {
    margin-right: 5px;
    opacity: 0.7;
}

/* === NACHRICHTEN === */
.rpgm-msg {
    display: flex;
    align-items: flex-start;
    margin-bottom: 18px;
    gap: 10px;
}

.rpgm-msg--right {
    flex-direction: row-reverse;
}

/* Side-Container (Nummer + Avatar) */
.rpgm-msg-side {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    flex-shrink: 0;
}

/* Bei rechten Bubbles: Nummer rechts vom Avatar */
.rpgm-msg--right .rpgm-msg-side {
    flex-direction: row-reverse;
}

/* Post-Nummer */
.rpgm-post-num {
    font-size: 0.6rem;
    font-weight: bold;
    text-decoration: none;
    opacity: 0.4;
    padding: 2px 4px;
    margin-top: 12px;
}

.rpgm-post-num:hover {
    opacity: 0.8;
}

/* Avatar-Spalte */
.rpgm-msg-avatar-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

/* Container für Edit/Delete-Buttons unter Avatar */
.rpgm-msg-actions-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-top: 5px;
    opacity: 0;
    transition: opacity 0.2s;
}

.rpgm-msg:hover .rpgm-msg-actions-side {
    opacity: 1;
}

/* Edit-Button unter Avatar */
.rpgm-edit-btn,
.rpgm-delete-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(128,128,128,0.1);
    text-decoration: none;
    font-size: 0.55rem;
    opacity: 0.7;
    transition: all 0.2s;
}

.rpgm-edit-btn:hover {
    opacity: 1;
    background: rgba(100,149,237,0.3);
    color: #4a90d9;
}

.rpgm-delete-btn:hover {
    opacity: 1;
    background: rgba(220,53,69,0.2);
    color: #dc3545;
}

.rpgm-msg-avatar-link {
    display: block;
}

.rpgm-msg-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s;
}

.rpgm-msg-avatar:hover {
    transform: scale(1.1);
}

.rpgm-msg-wrap {
    max-width: 65%;
}

.rpgm-msg--right .rpgm-msg-wrap {
    text-align: right;
}

.rpgm-msg-bubble {
    display: inline-block;
    padding: 10px 14px;
    border-radius: 18px;
    line-height: 1.45;
    text-align: left;
}

.rpgm-msg--left .rpgm-msg-bubble {
    background: rgba(128,128,128,0.12);
    border-bottom-left-radius: 4px;
}

.rpgm-msg--right .rpgm-msg-bubble {
    background: #3b82f6;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.rpgm-msg-time {
    font-size: 0.65rem;
    opacity: 0.5;
    margin-top: 3px;
    padding: 0 5px;
}

/* === QUICKREPLY === */
.rpgm-quickreply {
    padding: 15px 20px;
    border-top: 1px solid rgba(128,128,128,0.15);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative; /* Anker für Emoji-Keyboard */
}

.rpgm-qr-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 600px;
}

.rpgm-qr-plus {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(128,128,128,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    font-size: 1rem;
    opacity: 0.7;
}

.rpgm-qr-plus:hover {
    background: rgba(128,128,128,0.25);
    opacity: 1;
}

/* Attach-Menu Wrapper */
.rpgm-qr-plus-wrap {
    position: relative;
}

/* Attach-Menu Popup */
.rpgm-attach-menu {
    position: absolute;
    bottom: 100%;
    left: 0;
    background: #fff;
    border: 1px solid rgba(128,128,128,0.2);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 8px 0;
    margin-bottom: 8px;
    min-width: 160px;
    z-index: 100;
}

.rpgm-attach-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 15px;
    border: none;
    background: none;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.1s;
    text-align: left;
}

.rpgm-attach-option:hover {
    background: rgba(128,128,128,0.1);
}

.rpgm-attach-option i {
    width: 18px;
    text-align: center;
    opacity: 0.7;
}

/* Input Modal für Bild/Link */
.rpgm-input-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.rpgm-input-modal-content {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.rpgm-input-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(128,128,128,0.15);
    font-weight: 600;
}

.rpgm-input-modal-close {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    opacity: 0.5;
    padding: 5px;
}

.rpgm-input-modal-close:hover {
    opacity: 1;
}

.rpgm-input-modal-body {
    padding: 20px;
}

.rpgm-input-modal-body input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(128,128,128,0.25);
    border-radius: 8px;
    font-size: 0.95rem;
    box-sizing: border-box;
}

.rpgm-input-modal-body input:focus {
    outline: none;
    border-color: #3b82f6;
}

.rpgm-input-preview {
    margin-top: 15px;
    text-align: center;
    min-height: 50px;
}

.rpgm-input-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
}

.rpgm-input-preview.rpgm-preview-error {
    color: #dc2626;
    font-size: 0.85rem;
    padding: 15px;
}

.rpgm-input-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid rgba(128,128,128,0.15);
}

.rpgm-input-cancel,
.rpgm-input-confirm {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
}

.rpgm-input-cancel {
    background: rgba(128,128,128,0.1);
}

.rpgm-input-cancel:hover {
    background: rgba(128,128,128,0.2);
}

.rpgm-input-confirm {
    background: #3b82f6;
    color: #fff;
}

.rpgm-input-confirm:hover {
    background: #2563eb;
}

.rpgm-quickreply textarea {
    flex: 1;
    padding: 8px 15px;
    border: 1px solid rgba(128,128,128,0.25);
    border-radius: 20px;
    resize: none;
    font-size: 0.9rem;
    line-height: 1.4;
    background: rgba(128,128,128,0.05);
    min-height: 36px;
    max-height: 100px;
    overflow-y: auto;
}

.rpgm-quickreply textarea:focus {
    outline: none;
    border-color: #3b82f6;
}

.rpgm-qr-send {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #3b82f6;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.85rem;
}

.rpgm-qr-send:hover {
    background: #2563eb;
}

/* === EMOJI-KEYBOARD BUTTON === */
.rpgm-qr-emoji {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    font-size: 1.1rem;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.rpgm-qr-emoji:hover {
    opacity: 1;
}

/* === EMOJI-KEYBOARD PANEL === */
.rpgm-emoji-kb {
    position: absolute;
    bottom: 100%;
    right: 0;
    width: 340px;
    max-width: 95vw;
    background: #fff;
    border: 1px solid rgba(128,128,128,0.2);
    border-radius: 16px;
    box-shadow: 0 -4px 25px rgba(0,0,0,0.15);
    z-index: 9998;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-bottom: 8px;
}

/* Suchfeld */
.rpgm-emoji-kb-header {
    padding: 10px 12px 6px;
}

.rpgm-emoji-kb-search {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid rgba(128,128,128,0.2);
    border-radius: 10px;
    font-size: 0.85rem;
    background: rgba(128,128,128,0.06);
    box-sizing: border-box;
}

.rpgm-emoji-kb-search:focus {
    outline: none;
    border-color: #3b82f6;
}

/* Kategorie-Tabs */
.rpgm-emoji-kb-tabs {
    display: flex;
    gap: 2px;
    padding: 4px 8px;
    border-bottom: 1px solid rgba(128,128,128,0.12);
    overflow-x: auto;
    scrollbar-width: none;
}

.rpgm-emoji-kb-tabs::-webkit-scrollbar {
    display: none;
}

.rpgm-emoji-kb-tab {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border: none;
    background: none;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
    transition: all 0.15s;
}

.rpgm-emoji-kb-tab:hover {
    opacity: 0.8;
    background: rgba(128,128,128,0.1);
}

.rpgm-emoji-kb-tab--active {
    opacity: 1;
    background: rgba(59,130,246,0.12);
}

/* Emoji-Grid */
.rpgm-emoji-kb-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    padding: 8px;
    height: 240px;
    overflow-y: auto;
    align-content: flex-start;
}

.rpgm-emoji-kb-grid::-webkit-scrollbar {
    width: 4px;
}

.rpgm-emoji-kb-grid::-webkit-scrollbar-thumb {
    background: rgba(128,128,128,0.25);
    border-radius: 2px;
}

.rpgm-emoji-kb-btn {
    width: 38px;
    height: 38px;
    border: none;
    background: none;
    font-size: 1.4rem;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.1s;
    padding: 0;
    line-height: 1;
}

.rpgm-emoji-kb-btn:hover {
    background: rgba(128,128,128,0.12);
    transform: scale(1.15);
}

/* Leer-Nachricht */
.rpgm-emoji-kb-empty {
    width: 100%;
    text-align: center;
    padding: 40px 20px;
    font-size: 0.85rem;
    opacity: 0.5;
}

/* === SUCH-LEISTE === */
.rpgm-search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: rgba(128,128,128,0.08);
    border-bottom: 1px solid rgba(128,128,128,0.15);
}

.rpgm-search-bar input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid rgba(128,128,128,0.25);
    border-radius: 20px;
    background: rgba(255,255,255,0.5);
    font-size: 0.9rem;
}

.rpgm-search-bar button {
    background: none;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    opacity: 0.7;
}

.rpgm-search-bar button:hover { opacity: 1; }

#rpgm-search-results {
    font-size: 0.8rem;
    opacity: 0.7;
    min-width: 40px;
}

.rpgm-highlight { background: rgba(255,220,0,0.3) !important; }
.rpgm-highlight-current { background: rgba(255,180,0,0.5) !important; }

/* === MESSAGE ACTIONS (Zitieren, Reagieren) === */
.rpgm-msg-actions {
    display: none;
    position: absolute;
    top: 5px;
    gap: 5px;
}

.rpgm-msg--left .rpgm-msg-actions { right: -60px; }
.rpgm-msg--right .rpgm-msg-actions { left: -60px; }

.rpgm-msg-bubble { position: relative; }
.rpgm-msg-bubble:hover .rpgm-msg-actions { display: flex; }

.rpgm-action-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(128,128,128,0.15);
    cursor: pointer;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rpgm-action-btn:hover { background: rgba(128,128,128,0.3); }

/* === MSG META (Zeit + Status) === */
.rpgm-msg-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 3px;
    padding: 0 5px;
}

.rpgm-msg-time {
    font-size: 0.65rem;
    opacity: 0.5;
}

.rpgm-msg-status {
    font-size: 0.7rem;
    color: #3b82f6;
}

/* === REAKTIONEN === */
.rpgm-reactions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 5px;
    padding: 0 5px;
}

.rpgm-reaction {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    background: rgba(128,128,128,0.1);
    border-radius: 12px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: transform 0.1s;
}

.rpgm-reaction:hover { transform: scale(1.1); }
.rpgm-reaction--own { background: rgba(59,130,246,0.2); }
.rpgm-reaction small { font-size: 0.7rem; opacity: 0.7; }

/* Reaktion Tooltip */
.rpgm-reaction {
    position: relative;
}

.rpgm-reaction-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.85);
    color: #fff;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    pointer-events: none;
    margin-bottom: 5px;
    z-index: 100;
}

.rpgm-reaction-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0,0,0,0.85);
}

.rpgm-reaction:hover .rpgm-reaction-tooltip {
    opacity: 1;
    visibility: visible;
}

/* === QUOTE STYLING (Chat-optimiert) === */
.rpgm-quote {
    margin: 0 0 10px 0;
    padding: 10px 12px;
    background: rgba(0,0,0,0.06);
    border-left: 3px solid rgba(128,128,128,0.5);
    border-radius: 8px;
    font-size: 0.9em;
}

.rpgm-msg--right .rpgm-quote {
    background: rgba(255,255,255,0.15);
    border-left-color: rgba(255,255,255,0.5);
}

.rpgm-quote-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8em;
    font-weight: 600;
    margin-bottom: 6px;
    opacity: 0.85;
}

.rpgm-quote-icon {
    font-size: 0.75em;
    transform: scaleX(-1);
}

.rpgm-quote-author {
    color: inherit;
}

.rpgm-quote-body {
    line-height: 1.4;
    opacity: 0.9;
}

/* Verstecke Standard-MyBB-Quotes falls noch vorhanden */
.rpgm-msg-bubble .quote_container {
    display: none !important;
}

/* === EMOJI PICKER === */
.rpgm-emoji-picker {
    position: fixed;
    background: #fff;
    border: 1px solid rgba(128,128,128,0.2);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 8px;
    z-index: 9999;
}

.rpgm-emoji-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    max-width: 200px;
}

.rpgm-emoji-list button {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    font-size: 1.2rem;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.1s;
}

.rpgm-emoji-list button:hover { background: rgba(128,128,128,0.15); }

/* === TYPING INDICATOR === */
.rpgm-typing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.85rem;
    opacity: 0.7;
}

.rpgm-typing-dots {
    display: flex;
    gap: 3px;
}

.rpgm-typing-dots span {
    width: 6px;
    height: 6px;
    background: #888;
    border-radius: 50%;
    animation: rpgm-typing 1.4s infinite;
}

.rpgm-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.rpgm-typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes rpgm-typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-4px); opacity: 1; }
}

/* === MODALS === */
.rpgm-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
}

.rpgm-modal-content {
    background: #fff;
    border-radius: 12px;
    max-width: 90%;
    max-height: 90%;
    overflow: auto;
}

.rpgm-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(128,128,128,0.15);
}

.rpgm-modal-header h3 { margin: 0; }

.rpgm-modal-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.6;
}

.rpgm-modal-close:hover { opacity: 1; }

/* === GALERIE === */
.rpgm-gallery { width: 600px; }

.rpgm-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    padding: 15px;
}

.rpgm-gallery-grid img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s;
}

.rpgm-gallery-grid img:hover { transform: scale(1.05); }

/* === LIGHTBOX === */
.rpgm-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.rpgm-lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.rpgm-lightbox button {
    position: absolute;
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
}

.rpgm-lightbox button:hover { background: rgba(255,255,255,0.3); }
.rpgm-lightbox-close { top: 20px; right: 20px; }
.rpgm-lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.rpgm-lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }

/* === ICONBAR BUTTONS === */
.rpgm-iconbar-btn {
    background: none;
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 0.8rem;
    opacity: 0.7;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.rpgm-iconbar-btn:hover { opacity: 1; }

/* === RESPONSIVE === */
@media (max-width: 600px) {
    .rpgm-header { flex-wrap: wrap; }
    .rpgm-header-avatars img { width: 32px; height: 32px; }
    .rpgm-sidebar { display: none; }
    .rpgm-msg-wrap { max-width: 80%; }
    .rpgm-iconbar { gap: 2px; }
    .rpgm-iconbar a, .rpgm-iconbar span { padding: 5px 8px; font-size: 0.75rem; }
    .rpgm-gallery { width: 95%; }
    .rpgm-gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .rpgm-msg-actions { position: static; display: flex; margin-top: 5px; }
    /* Emoji-Keyboard mobil: volle Breite */
    .rpgm-emoji-kb { width: 100%; max-width: 100%; right: 0; border-radius: 16px 16px 0 0; margin-bottom: 0; }
    .rpgm-emoji-kb-grid { height: 200px; }
}

/* === INLINE MODERATION === */
.rpgm-wrapper .inline_moderation,
.rpgm-wrapper .moderation_options {
    margin: 15px 0 0 0;
    padding: 15px 20px;
    background: rgba(128,128,128,0.05);
    border-top: 1px solid rgba(128,128,128,0.15);
    border-radius: 0 0 8px 8px;
}

.rpgm-wrapper .inline_moderation select,
.rpgm-wrapper .moderation_options select {
    padding: 8px 12px;
    border: 1px solid rgba(128,128,128,0.3);
    border-radius: 6px;
    background: transparent;
    font-size: 0.85rem;
}

.rpgm-wrapper .inline_moderation input[type="submit"],
.rpgm-wrapper .moderation_options input[type="submit"] {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    background: rgba(59,130,246,0.8);
    color: #fff;
    cursor: pointer;
    font-size: 0.85rem;
    margin-left: 10px;
}

.rpgm-wrapper .inline_moderation input[type="submit"]:hover,
.rpgm-wrapper .moderation_options input[type="submit"]:hover {
    background: rgba(59,130,246,1);
}
