/* 
   Sufirain Chat Live Broadcast Styles
   Professional Glassmorphic Design
*/

.broadcast-widget {
    display: flex;
    align-items: center;
    gap: 12px;
}

.broadcast-control-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    border-radius: 50px;
    border: 1px solid rgba(0,0,0,0.05);
    background: #fff;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.broadcast-control-btn.inactive {
    color: #64748b;
}

.broadcast-control-btn.active {
    background: #ef4444;
    color: #fff;
    border-color: #ef4444;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.broadcast-control-btn.joined {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.broadcast-control-btn .live-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
}

.broadcast-control-btn.active .live-indicator {
    background: #fff;
    animation: pulse-red 1.5s infinite;
}

.broadcast-control-btn.joined .live-indicator {
    background: #fff;
    animation: pulse-blue 1.5s infinite;
}

.broadcast-control-btn i {
    font-size: 16px;
}

.broadcast-control-btn .btn-text {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -0.2px;
}

/* Animations */
@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(255, 255, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

@keyframes pulse-blue {
    0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(255, 255, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

/* System Message Style */
.message.system-alert {
    align-self: center;
    max-width: 90%;
    margin: 15px 0;
    animation: fadeIn 0.5s ease;
}

.message.system-alert .message-bubble {
    background: rgba(241, 245, 249, 0.8);
    backdrop-filter: blur(4px);
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 12px;
    padding: 6px 16px;
    border-radius: 30px;
    font-style: italic;
    box-shadow: none;
    text-align: center;
}

.message.system-alert .message-sender,
.message.system-alert .message-avatar,
.message.system-alert .message-time {
    display: none;
}

.message.system-alert.system-live-start .message-bubble {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.message.system-alert.system-live-stop .message-bubble {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.btn-join-live-msg {
    display: block;
    margin: 8px auto 0;
    background: #16a34a;
    color: #fff !important;
    border-radius: 20px;
    padding: 4px 16px;
    font-size: 13px;
    font-weight: 700;
    border: none;
    box-shadow: 0 4px 10px rgba(22, 163, 74, 0.2);
    transition: all 0.2s;
}

.btn-join-live-msg:hover {
    background: #15803d;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(22, 163, 74, 0.3);
}

.btn-join-live-msg i {
    margin-right: 6px;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .broadcast-control-btn .btn-text {
        display: none;
    }
    .broadcast-control-btn {
        padding: 8px 12px;
    }
    .message.system-alert {
        max-width: 100%;
    }
}
