/* =======================================================
   DaggerRO - Eventos em Tempo Real & Notificações (Patcher UI)
   ======================================================= */

.events-main-wrap {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    gap: 10px;
}

.events-top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.btn-events-refresh {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-events-refresh:hover {
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.4);
    color: var(--accent);
}

.events-content-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.9fr;
    gap: 12px;
    flex: 1;
    min-height: 0;
}

.events-list-box {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.events-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-main);
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 8px;
    flex-shrink: 0;
}

.events-live-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 9px;
    font-weight: 600;
    color: #4ade80;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.25);
    padding: 2px 7px;
    border-radius: 12px;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #22c55e;
    box-shadow: 0 0 6px #22c55e;
    animation: pulseGlow 1.8s infinite;
}

@keyframes pulseGlow {
    0% { transform: scale(0.9); opacity: 0.8; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 0 5px rgba(34, 197, 94, 0); }
    100% { transform: scale(0.9); opacity: 0.8; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.events-list-scroll {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding-right: 4px;
}

.events-list-scroll::-webkit-scrollbar {
    width: 4px;
}

.events-list-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.event-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 8px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.event-card:hover {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(255, 255, 255, 0.12);
}

.event-card.is-open {
    background: rgba(34, 197, 94, 0.06);
    border: 1px solid rgba(34, 197, 94, 0.3);
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.08);
}

.event-left {
    display: flex;
    align-items: center;
    gap: 9px;
}

.event-icon-wrap {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}

.event-card.is-open .event-icon-wrap {
    background: rgba(34, 197, 94, 0.18);
    border: 1px solid rgba(34, 197, 94, 0.35);
}

.event-details {
    display: flex;
    flex-direction: column;
}

.event-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-main);
}

.event-card.is-open .event-title {
    color: #86efac;
}

.event-subtitle {
    font-size: 8.5px;
    color: var(--text-muted);
}

.event-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 9px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
}

.badge-open {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.4);
    animation: badgePulse 2s infinite;
}

.badge-starting {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.5);
    animation: badgePulse 1.5s infinite;
}

.badge-closed {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-dim);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

@keyframes badgePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.75; }
}

.event-item-loading,
.event-item-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 10px;
    color: var(--text-muted);
    font-size: 10px;
    text-align: center;
    gap: 4px;
}

/* Sidebar Info Cards */
.events-info-sidebar {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.events-card-box {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 10px 12px;
}

.events-card-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.events-card-text {
    font-size: 9.5px;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 9px;
}

.btn-test-notification {
    width: 100%;
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(37, 99, 235, 0.2));
    border: 1px solid rgba(56, 189, 248, 0.4);
    border-radius: 6px;
    color: var(--accent);
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-test-notification:hover {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.35), rgba(37, 99, 235, 0.35));
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.events-rules-box {
    flex: 1;
}

.events-bullet-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.events-bullet-list li {
    font-size: 9px;
    color: var(--text-muted);
    line-height: 1.35;
    position: relative;
    padding-left: 12px;
}

.events-bullet-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

.events-bullet-list code {
    background: rgba(0, 0, 0, 0.4);
    padding: 1px 4px;
    border-radius: 3px;
    color: var(--gold);
    font-family: monospace;
    font-size: 9px;
}

/* =======================================================
   TOAST NOTIFICATION (CANTO INFERIOR DIREITO)
   ======================================================= */

.toast-container {
    position: fixed;
    bottom: 60px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.event-toast {
    pointer-events: auto;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid #22c55e;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 16px rgba(34, 197, 94, 0.35);
    border-radius: 10px;
    padding: 10px 14px;
    color: #f8fafc;
    font-family: var(--font);
    font-size: 11px;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(12px);
    animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    max-width: 320px;
}

.event-toast.fade-out {
    animation: toastSlideOut 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.event-toast-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.event-toast-body {
    display: flex;
    flex-direction: column;
}

.event-toast-title {
    font-size: 11px;
    font-weight: 800;
    color: #4ade80;
    letter-spacing: 0.3px;
}

.event-toast-text {
    font-size: 10px;
    color: #e2e8f0;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(110%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(110%);
        opacity: 0;
    }
}

/* =======================================================
   PAINEL ADMIN DE EVENTOS
   ======================================================= */
.btn-admin-events {
    display: none;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.2), rgba(168, 85, 247, 0.2));
    border: 1px solid rgba(234, 179, 8, 0.4);
    border-radius: 6px;
    color: #fde047;
    font-size: 9.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-admin-events:hover {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.35), rgba(168, 85, 247, 0.35));
    border-color: #fde047;
    color: #fff;
    box-shadow: 0 0 10px rgba(234, 179, 8, 0.3);
}

.events-admin-modal {
    max-width: 660px;
    width: 95%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.admin-events-list {
    max-height: 230px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 4px;
}

.admin-events-list::-webkit-scrollbar {
    width: 4px;
}

.admin-events-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.admin-event-row {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: all 0.2s ease;
}

.admin-event-row:hover {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(20, 30, 50, 0.8);
}

.admin-event-row-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-event-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.admin-event-inputs {
    display: flex;
    gap: 6px;
    align-items: center;
    flex: 1;
}

.admin-event-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
}

.btn-ev-action {
    padding: 3px 8px;
    font-size: 9px;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
}

.btn-ev-open {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #4ade80;
}
.btn-ev-open:hover {
    background: rgba(34, 197, 94, 0.4);
    color: #fff;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.3);
}

.btn-ev-close {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
}
.btn-ev-close:hover {
    background: rgba(239, 68, 68, 0.4);
    color: #fff;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.3);
}

.btn-ev-save {
    background: rgba(56, 189, 248, 0.2);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #38bdf8;
}
.btn-ev-save:hover {
    background: rgba(56, 189, 248, 0.4);
    color: #fff;
}

.btn-ev-del {
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid rgba(148, 163, 184, 0.25);
    color: #94a3b8;
}
.btn-ev-del:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: #ef4444;
    color: #fff;
}

