/* ========================================
   ZONE PANEL (SIDEBAR)
   ======================================== */

.zone-panel {
    --zone-data-min-height: 60px;
    position: absolute;
    right: 24px;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    width: 320px;
    height: min(calc(100% - 48px), 780px);
    max-height: calc(100% - 48px);
    background: rgba(8, 10, 14, 0.64);
    backdrop-filter: blur(28px) saturate(175%);
    -webkit-backdrop-filter: blur(28px) saturate(175%);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 20px;
    box-shadow: 0 18px 48px rgba(0,0,0,0.58);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 100;
}

.panel-section {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 0;
}

.panel-section:last-child {
    border-bottom: none;
}

.layers-section {
    flex: 1 1 auto;
    min-height: 148px;
}

.zone-data-section {
    flex: 0 0 60px;
    min-height: var(--zone-data-min-height);
    max-height: 18%;
}

.panel-resizer {
    display: none;
}

.panel-resizer::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 44px;
    height: 4px;
    transform: translate(-50%, -50%);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
}

body.is-resizing-panels {
    cursor: row-resize;
    user-select: none;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.panel-header h3 {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.4);
}

.zone-count {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    padding: 3px 6px;
    background: rgba(var(--color-accent-rgb), 0.15);
    border: 1px solid rgba(var(--color-accent-rgb), 0.3);
    border-radius: 6px;
    color: var(--color-accent);
}

.zone-list {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-sm);
}

.zone-data-body {
    padding: 2px 14px 12px;
    background: transparent;
}

.zone-data-section .panel-header {
    padding: 10px 14px 4px;
    background: transparent;
    border-bottom: none;
}

.zone-data-section .panel-header h3 {
    letter-spacing: 1.4px;
    color: rgba(255, 255, 255, 0.32);
}

.zone-data-section .coords-info-glass {
    background: transparent;
    border: none;
    border-radius: 0;
    font-size: 10px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.5);
    max-height: none;
    overflow: auto;
    padding: 0;
    box-shadow: none;
}

/* Scrollbar Styling */
.zone-list::-webkit-scrollbar {
    width: 6px;
}

.zone-list::-webkit-scrollbar-track {
    background: transparent;
}

.zone-list::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 3px;
}

.zone-list::-webkit-scrollbar-thumb:hover {
    background: var(--color-border-hover);
}

/* Zone List Items */
.zone-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 8px;
}

.zone-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(4px);
}

.zone-item.selected {
    background: rgba(var(--color-accent-rgb), 0.15);
    border-color: var(--color-accent);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.zone-item.multi-selected {
    border-color: var(--color-accent);
    background: rgba(var(--color-accent-rgb), 0.1);
    border-style: dashed;
}

.zone-shape-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    flex-shrink: 0;
}

.zone-item-info {
    flex: 1;
    min-width: 0;
}

.zone-item-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.zone-item-meta {
    margin-top: 4px;
}

.profile-tag {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
}

.zone-item-actions {
    display: flex;
    gap: 4px;
    align-items: center;
}

.zone-action-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    padding: 4px;
    cursor: pointer;
    border-radius: 6px;
    opacity: 0;
    transition: color 0.15s, opacity 0.15s, background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zone-item:hover .zone-action-btn {
    opacity: 1;
}

.zone-action-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.08);
}

.zone-action-delete:hover {
    color: #ff4757;
    background: rgba(255, 77, 87, 0.1);
}

.zone-action-btn svg {
    width: 14px;
    height: 14px;
}

.overlay-tint-toggle.is-active {
    opacity: 1;
    color: var(--color-accent);
    background: rgba(var(--color-accent-rgb), 0.12);
}

.overlay-tint-chip {
    position: relative;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
    opacity: 0;
    transition: opacity 0.15s, transform 0.15s, border-color 0.15s;
    cursor: pointer;
}

.zone-item:hover .overlay-tint-chip,
.zone-item.selected .overlay-tint-chip {
    opacity: 1;
}

.overlay-tint-chip:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.28);
}

.overlay-tint-chip__swatch {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--overlay-tint, #00ff88);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

.overlay-tint-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.zone-visibility {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    padding: 4px;
    cursor: pointer;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zone-visibility:hover {
    color: white;
}

.zone-visibility svg {
    width: 16px;
    height: 16px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl);
    text-align: center;
    color: var(--color-text-muted);
}

/* Sidebar Highlight Animation */
.highlight-pulse {
    animation: sidebarPulse 1s ease-out;
}

@keyframes sidebarPulse {
    0% { background: rgba(var(--color-accent-rgb), 0); }
    30% { background: rgba(var(--color-accent-rgb), 0.3); }
    100% { background: rgba(var(--color-accent-rgb), 0); }
}
