/* ============================================
   Spray Override Panel
   ============================================ */

.so-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 420px;
    max-width: 90vw;
    height: 100vh;
    background: #0d0d18;
    border-left: 1px solid #222;
    z-index: 5000;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease;
}

.so-panel-hidden {
    transform: translateX(100%);
}

.so-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #222;
    background: #111;
}

.so-header h3 {
    font-size: 14px;
    color: #e63946;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.so-close {
    background: none;
    border: none;
    color: #666;
    font-size: 20px;
    cursor: pointer;
    padding: 0 4px;
}

.so-close:hover {
    color: #fff;
}

.so-info {
    padding: 10px 16px;
    font-size: 11px;
    color: #666;
    line-height: 1.5;
    border-bottom: 1px solid #1a1a2e;
}

.so-stats {
    display: flex;
    gap: 12px;
    padding: 10px 16px;
    font-size: 11px;
    color: #999;
    border-bottom: 1px solid #1a1a2e;
    flex-wrap: wrap;
}

.so-stats span {
    background: #111;
    padding: 3px 8px;
    border-radius: 3px;
    border: 1px solid #222;
}

.so-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.so-empty {
    padding: 40px 16px;
    text-align: center;
    color: #555;
    font-size: 12px;
}

/* Group */

.so-group {
    margin-bottom: 4px;
}

.so-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    background: #111;
    border-top: 1px solid #1a1a2e;
    border-bottom: 1px solid #1a1a2e;
}

.so-group-header.so-unmatched {
    background: #1a0a0a;
    border-color: #331111;
}

.so-group-name {
    font-size: 12px;
    font-weight: 700;
    color: #ccc;
}

.so-unmatched .so-group-name {
    color: #e63946;
}

.so-group-count {
    font-size: 10px;
    color: #666;
}

/* Event row */

.so-event {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 16px;
    border-bottom: 1px solid #111;
    gap: 8px;
}

.so-event:hover {
    background: #0f0f1f;
}

.so-event.so-overridden {
    background: #0a0f1a;
    border-left: 2px solid #3b82f6;
}

.so-event-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.so-event-time {
    font-size: 11px;
    color: #aaa;
}

.so-event-detail {
    font-size: 10px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.so-event-badge {
    display: inline-block;
    font-size: 9px;
    padding: 1px 6px;
    border-radius: 2px;
    background: #1a2a4a;
    color: #3b82f6;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.so-event-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.so-field-select {
    background: #111;
    border: 1px solid #333;
    color: #ccc;
    font-size: 10px;
    padding: 3px 4px;
    border-radius: 3px;
    max-width: 140px;
}

.so-field-select:focus {
    border-color: #e63946;
    outline: none;
}

.so-override-btn,
.so-revert-btn {
    background: #1a1a2e;
    border: 1px solid #333;
    color: #ccc;
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 3px;
    cursor: pointer;
    white-space: nowrap;
}

.so-override-btn:hover {
    background: #e63946;
    border-color: #e63946;
    color: #fff;
}

.so-revert-btn:hover {
    background: #333;
    color: #fff;
}

.so-override-btn:disabled,
.so-revert-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.so-truncated {
    padding: 6px 16px;
    font-size: 10px;
    color: #555;
    font-style: italic;
    text-align: center;
}