/* RL Live Chat 1.0 – styl neonowo-radiowy (aqua / cyber) */

.rl-live-chat-wrapper {
    position: fixed;
    z-index: 99999;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #f5f7ff;
}

/* Pozycja: prawa krawędź (desktop) */
.rl-position-right {
    right: 20px;
    bottom: 20px;
}

/* Pozycja: dół (na potrzeby mobile – przełączana przez media query) */
.rl-position-bottom {
    left: 0;
    right: 0;
    bottom: 0;
}

.rl-live-chat-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: radial-gradient(circle at 0 0, #29ffc6, #3b2667 60%);
    box-shadow: 0 0 18px rgba(0, 255, 200, 0.35);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
    backdrop-filter: blur(10px);
}

.rl-live-chat-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 26px rgba(0, 255, 200, 0.5);
}

.rl-live-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff1744;
    box-shadow: 0 0 12px rgba(255, 23, 68, 0.9);
    position: relative;
}

.rl-live-dot::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    border: 1px solid rgba(255, 255, 255, 0.6);
    opacity: 0.7;
}

.rl-live-label {
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
    color: #e3fdfd;
}

.rl-live-chat-panel {
    position: absolute;
    right: 0;
    bottom: 46px;
    width: 340px;
    max-height: 520px;
    display: none;
    flex-direction: column;
    border-radius: 18px;
    overflow: hidden;
    background: radial-gradient(circle at 20% 0, rgba(0, 255, 200, 0.15), rgba(3, 6, 18, 0.96));
    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.8),
        0 0 40px rgba(0, 255, 200, 0.25);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 255, 200, 0.2);
}

.rl-live-chat-panel.rl-open {
    display: flex;
    animation: rlChatFadeIn 0.22s ease-out;
}

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

.rl-live-chat-header {
    padding: 10px 12px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(120deg, rgba(0, 0, 0, 0.7), rgba(12, 22, 46, 0.9));
    display: grid;
    grid-template-columns: 1fr auto;
    grid-row-gap: 4px;
    column-gap: 10px;
    align-items: center;
}

.rl-live-header-main {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rl-live-status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #00e676;
    box-shadow: 0 0 10px rgba(0, 230, 118, 0.8);
}

.rl-live-title {
    font-size: 13px;
    font-weight: 600;
    color: #e3f2fd;
}

.rl-live-header-sub {
    grid-column: 1 / span 1;
    font-size: 11px;
    color: #90a4ae;
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.rl-live-room {
    font-weight: 500;
    color: #b2ebf2;
}

.rl-live-connection-status {
    font-style: italic;
}

.rl-live-close {
    grid-row: 1 / span 2;
    align-self: start;
    border: none;
    background: transparent;
    color: #cfd8dc;
    cursor: pointer;
    padding: 4px 2px;
    font-size: 16px;
    line-height: 1;
    transition: color 0.15s ease, transform 0.15s ease;
}

.rl-live-close:hover {
    color: #ffffff;
    transform: scale(1.05);
}

.rl-live-nick-step {
    padding: 10px 12px 8px;
    font-size: 12px;
    color: #cfd8dc;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.rl-live-nick-info {
    margin: 0 0 6px;
    line-height: 1.4;
}

.rl-live-nick-form {
    display: flex;
    gap: 6px;
}

.rl-live-nick-input {
    flex: 1;
    min-width: 0;
    border-radius: 999px;
    border: 1px solid rgba(176, 190, 197, 0.7);
    background: rgba(13, 25, 43, 0.9);
    color: #e3f2fd;
    padding: 6px 10px;
    font-size: 12px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.rl-live-nick-input:focus {
    border-color: #29ffc6;
    box-shadow: 0 0 0 1px rgba(41, 255, 198, 0.5);
    background: rgba(6, 16, 34, 0.95);
}

.rl-live-nick-button {
    border-radius: 999px;
    border: none;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    cursor: pointer;
    background: linear-gradient(130deg, #29ffc6, #0cebeb);
    color: #041019;
    box-shadow: 0 0 18px rgba(41, 255, 198, 0.4);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
    white-space: nowrap;
}

.rl-live-nick-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 24px rgba(41, 255, 198, 0.55);
    filter: brightness(1.03);
}

.rl-live-chat-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}


.rl-live-messages {
    flex: 1;
    padding: 10px 10px 6px;
    overflow-y: auto;
    font-size: 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(120, 144, 156, 0.7) transparent;
}

.rl-live-messages::-webkit-scrollbar {
    width: 6px;
}

.rl-live-messages::-webkit-scrollbar-thumb {
    background: rgba(120, 144, 156, 0.7);
    border-radius: 999px;
}

.rl-msg-row {
    margin-bottom: 6px;
    display: flex;
    flex-direction: column;
    max-width: 100%;
}

.rl-msg-row-you {
    align-items: flex-end;
}

.rl-msg-meta {
    font-size: 10px;
    color: #90a4ae;
    margin-bottom: 2px;
}

.rl-msg-meta span.rl-nick {
    font-weight: 600;
    color: #e1f5fe;
}

.rl-msg-bubble {
    padding: 6px 9px;
    border-radius: 12px;
    background: rgba(3, 16, 33, 0.9);
    color: #eceff1;
    line-height: 1.35;
    border: 1px solid rgba(120, 144, 156, 0.4);
    backdrop-filter: blur(6px);
}

.rl-msg-row-you .rl-msg-bubble {
    background: radial-gradient(circle at 0 0, rgba(41, 255, 198, 0.25), rgba(0, 10, 20, 0.98));
    border-color: rgba(41, 255, 198, 0.8);
}

.rl-msg-system .rl-msg-bubble {
    font-style: italic;
    color: #b0bec5;
    border-style: dashed;
    border-color: rgba(144, 164, 174, 0.7);
    background: rgba(10, 25, 49, 0.95);
}

.rl-live-message-form {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: linear-gradient(180deg, rgba(3, 7, 18, 0.98), rgba(3, 7, 18, 0.96));
}

.rl-live-message-input {
    flex: 1;
    border-radius: 999px;
    border: 1px solid rgba(96, 125, 139, 0.9);
    background: rgba(8, 20, 39, 0.94);
    color: #e3f2fd;
    padding: 7px 11px;
    font-size: 12px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    min-width: 0;
}

.rl-live-message-input:focus {
    border-color: #29ffc6;
    box-shadow: 0 0 0 1px rgba(41, 255, 198, 0.5);
    background: rgba(2, 12, 28, 0.98);
}

.rl-live-send-btn {
    border-radius: 999px;
    border: none;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    cursor: pointer;
    background: linear-gradient(135deg, #00bcd4, #29ffc6);
    color: #021014;
    box-shadow: 0 0 16px rgba(0, 188, 212, 0.5);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
    white-space: nowrap;
}

.rl-live-send-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 22px rgba(0, 188, 212, 0.7);
    filter: brightness(1.04);
}

.rl-live-send-btn:disabled,
.rl-live-message-input:disabled {
    opacity: 0.6;
    cursor: default;
}

/* Mobile: panel na dole, pełna szerokość */
@media (max-width: 768px) {
    .rl-position-right {
        left: 0;
        right: 0;
        bottom: 0;
    }

    .rl-live-chat-wrapper {
        right: 0;
        left: 0;
    }

    .rl-live-chat-toggle {
        margin: 0 auto 6px;
        justify-content: center;
    }

    .rl-live-chat-panel {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-height: 60vh;
        border-radius: 18px 18px 0 0;
    }
}

/* ===== Dodatki v1.2.1: MODERATOR + przyciski przy każdej wiadomości ===== */

.rl-badge-mod{
    display:inline-block;
    margin-left:6px;
    padding:1px 6px;
    font-size:10px;
    font-weight:700;
    letter-spacing:0.06em;
    border-radius:999px;
    color:#041019;
    background: linear-gradient(135deg, #ff1744, #ff8a80);
    box-shadow: 0 0 10px rgba(255,23,68,0.45);
    vertical-align:middle;
}

.rl-mod-tools{
    display:flex;
    gap:6px;
    margin-top:4px;
    opacity:0.45;
}

.rl-msg-row-you .rl-mod-tools{
    align-self:flex-end;
}

.rl-msg-row:hover .rl-mod-tools{
    opacity:1;
}

.rl-mod-tools button{
    border:none;
    background: rgba(255,255,255,0.06);
    color:#e3f2fd;
    border-radius:10px;
    padding:3px 6px;
    cursor:pointer;
    font-size:12px;
    line-height:1;
    transition: transform 0.12s ease, background 0.12s ease, opacity 0.12s ease;
}

.rl-mod-tools button:hover{
    transform: translateY(-1px);
    background: rgba(41,255,198,0.12);
}
.rl-live-notify-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 16px;
    margin-left: 6px;
    color: #b2ebf2;
    opacity: 0.8;
}

.rl-live-notify-btn:hover {
    opacity: 1;
}

.rl-live-notify-btn.enabled {
    color: #29ffc6;
}
