/* ═══════════════════════════════════════════════════
   City Canvas Admin Module — Styles
   Uses admin.css design system vars (--bg, --card, etc.)
   ═══════════════════════════════════════════════════ */

/* ── Canvas Container ── */
.cc-canvas-wrap {
    position: relative;
    background: var(--bg, #111318);
    border: 1px solid var(--border, #1f2937);
    border-radius: var(--radius-xl, 16px);
    overflow: hidden;
    cursor: crosshair;
    aspect-ratio: 1;
    max-height: 600px;
    margin-bottom: 20px;
}

.cc-canvas-wrap canvas {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

/* ── Pixel Tooltip ── */
.cc-tooltip {
    position: absolute;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(12px);
    color: #fff;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
    z-index: 20;
    transform: translate(-50%, -100%) translateY(-12px);
    transition: opacity 0.15s;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.cc-tooltip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid rgba(0, 0, 0, 0.88);
}

/* ── Zoom Controls ── */
.cc-zoom-controls {
    position: absolute;
    bottom: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 10;
}

.cc-zoom-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--border, #374151);
    background: var(--surface, #1c1f2e);
    color: var(--text, #e5e7eb);
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    font-family: 'Outfit', sans-serif;
}

.cc-zoom-btn:hover {
    background: var(--primary, #6366f1);
    color: #fff;
    border-color: var(--primary, #6366f1);
}

/* ── Color swatch in pixel info ── */
.cc-color-swatch {
    display: inline-block;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    vertical-align: middle;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ── Ban Badge ── */
.cc-ban-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Canvas Legend (bottom bar showing coordinates) ── */
.cc-coords {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    color: #e5e7eb;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    font-feature-settings: 'tnum';
    font-variant-numeric: tabular-nums;
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ── Empty Canvas State ── */
.cc-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    color: var(--text-muted, #6b7280);
    text-align: center;
}

.cc-empty .material-icons-outlined {
    font-size: 56px;
    opacity: 0.25;
    margin-bottom: 16px;
}

/* ── Checkerboard background for empty cells ── */
.cc-canvas-wrap {
    background-image:
        linear-gradient(45deg, rgba(255,255,255,0.02) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255,255,255,0.02) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.02) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.02) 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}
