/* ============================================================
   Sidebar Live Training Widget
   sidebar-live-ad.css — v3 (mini event listing)
   ============================================================ */

.sb-live-widget {
    background: white;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    margin-bottom: 0;
}

.sb-live-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #1e40af;
    color: white;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.sb-live-dot {
    width: 8px;
    height: 8px;
    background: #34d399;
    border-radius: 50%;
    animation: sbPulse 2s ease-in-out infinite;
}

@keyframes sbPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(52,211,153,0.6); }
    50% { opacity: 0.8; box-shadow: 0 0 0 4px rgba(52,211,153,0); }
}

.sb-live-events {
    padding: 4px 0;
}

.sb-live-loading {
    text-align: center;
    padding: 20px 16px;
    font-size: 13px;
    color: #94a3b8;
}

/* Individual event row */
.sb-live-event {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.sb-live-event:last-child {
    border-bottom: none;
}

.sb-live-event:hover {
    background: #f8fafc;
}

/* Date block */
.sb-live-date {
    flex-shrink: 0;
    width: 44px;
    text-align: center;
}

.sb-live-date-month {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #1e40af;
    letter-spacing: 0.5px;
    line-height: 1;
}

.sb-live-date-day {
    font-size: 22px;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.1;
}

.sb-live-date-dow {
    font-size: 9px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1;
    margin-top: 1px;
}

/* Event info */
.sb-live-info {
    flex: 1;
    min-width: 0;
}

.sb-live-name {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.sb-live-meta {
    font-size: 11px;
    color: #64748b;
    margin-top: 2px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    line-height: 1.3;
}

.sb-live-meta span {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

/* Seats indicator */
.sb-live-seats {
    flex-shrink: 0;
    text-align: right;
}

.sb-live-seats-count {
    font-size: 14px;
    font-weight: 800;
    color: #059669;
    line-height: 1;
}

.sb-live-seats-label {
    font-size: 9px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

.sb-live-seats.sb-seats-low .sb-live-seats-count {
    color: #d97706;
}

.sb-live-seats.sb-seats-critical .sb-live-seats-count {
    color: #dc2626;
    animation: sbSeatsFlash 1.5s ease-in-out infinite;
}

@keyframes sbSeatsFlash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Tier badge */
.sb-live-tier {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 1px 5px;
    border-radius: 3px;
    line-height: 1.4;
    vertical-align: middle;
}

.sb-tier-beginner { background: #dbeafe; color: #1e40af; }
.sb-tier-advanced { background: #fef3c7; color: #92400e; }
.sb-tier-certification { background: #ede9fe; color: #5b21b6; }
.sb-tier-executive { background: #fce7f3; color: #9d174d; }

/* CTA button */
.sb-live-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 16px;
    background: #1e40af;
    color: white;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    transition: background 0.2s;
}

.sb-live-cta:hover {
    background: #1d4ed8;
}

/* Empty state */
.sb-live-empty {
    text-align: center;
    padding: 20px 16px;
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.5;
}

.sb-live-empty strong {
    display: block;
    color: #475569;
    margin-bottom: 4px;
}

/* Responsive */
@media (max-width: 768px) {
    .sb-live-event { padding: 8px 12px; }
    .sb-live-date { width: 40px; }
    .sb-live-date-day { font-size: 20px; }
    .sb-live-name { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .sb-live-dot, .sb-live-seats.sb-seats-critical .sb-live-seats-count {
        animation: none;
    }
}
