/**
 * Building Visualizer Styles
 * 3D visualization of building envelopes based on Chicago zoning regulations
 */

:root {
    --lot-color: #8B9A46;
    --building-color: #4A90D9;
    --setback-color: #E8E8E8;
    --grid-color: #CCCCCC;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f5f5f5;
}

.navbar-brand img {
    height: 30px;
}

.sidebar-scroll {
    height: calc(100vh - 80px);
    overflow-y: auto;
    padding-right: 10px;
}

.canvas-fixed {
    position: sticky;
    top: 80px;
}

#visualizer-container {
    width: 100%;
    height: calc(100vh - 80px);
    min-height: 500px;
    background: linear-gradient(180deg, #87CEEB 0%, #E0F4FF 100%);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

#canvas-container {
    width: 100%;
    height: 100%;
}

.stats-card {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stats-card h5 {
    color: #333;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0;
    border-bottom: 1px solid #eee;
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-label {
    color: #666;
    font-size: 0.875rem;
}

.stat-value {
    font-weight: 600;
    color: #333;
}

.control-group {
    margin-bottom: 1rem;
}

.control-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #555;
    margin-bottom: 0.25rem;
    display: block;
}

.control-group input[type="range"] {
    width: 100%;
}

.control-value {
    text-align: right;
    font-size: 0.875rem;
    color: #333;
    font-weight: 600;
}

.btn-visualize {
    background-color: var(--building-color);
    border-color: var(--building-color);
    color: white;
}

.btn-visualize:hover {
    background-color: #3a7bc8;
    border-color: #3a7bc8;
    color: white;
}

.legend {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(255,255,255,0.95);
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 11px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    max-height: 200px;
    overflow-y: auto;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    font-size: 0.75rem;
}

.legend-item:last-child {
    margin-bottom: 0;
}

.legend-color {
    width: 14px;
    height: 14px;
    margin-right: 8px;
    border-radius: 2px;
    flex-shrink: 0;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.zone-info {
    background: #f8f9fa;
    border-left: 4px solid var(--building-color);
    padding: 0.75rem;
    margin-bottom: 1rem;
}

.zone-class {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--building-color);
}

.common-uses {
    font-size: 0.875rem;
    color: #666;
    margin-top: 0.25rem;
}

#error-message {
    display: none;
}

.instructions {
    background: #fff3cd;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.instructions h5 {
    color: #856404;
    margin-bottom: 0.5rem;
}

.instructions p {
    color: #856404;
    margin-bottom: 0;
    font-size: 0.9rem;
}

.camera-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
}

.camera-controls button {
    background: rgba(255,255,255,0.9);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 4px;
    margin-left: 4px;
    cursor: pointer;
}

.camera-controls button:hover {
    background: white;
}

.export-controls {
    position: absolute;
    top: 56px;
    right: 10px;
    z-index: 5;
}

.export-controls .btn {
    background: rgba(255,255,255,0.9);
    border: 1px solid #ddd;
    font-size: 0.85rem;
}

.export-controls .btn:hover {
    background: white;
}

.export-controls .dropdown-menu {
    font-size: 0.9rem;
}

.layer-controls {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 5;
    min-width: 180px;
}

.layer-controls-header {
    padding: 8px 12px;
    font-weight: 600;
    font-size: 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px 8px 0 0;
}

.layer-controls-body {
    padding: 10px 12px;
}

.layer-controls-body .form-check {
    margin-bottom: 7px;
}

.layer-controls-body .form-check:last-child {
    margin-bottom: 0;
}

.layer-controls-body .form-check-label {
    font-size: 0.75rem;
    cursor: pointer;
    user-select: none;
}

.layer-controls-body .form-check-input {
    cursor: pointer;
}

.setback-label {
    position: absolute;
    background: rgba(206, 133, 133, 0.8);
    color: white;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 3px;
    pointer-events: none;
    white-space: nowrap;
    transform: translate(-50%, -50%);
    z-index: 5;
}

.footprint-label {
    position: absolute;
    background: rgba(74, 144, 217, 0.85);
    color: white;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    pointer-events: none;
    white-space: nowrap;
    transform: translate(-50%, -50%);
    z-index: 6;
}

.dimension-label {
    position: absolute;
    background: rgba(42, 90, 138, 0.85);
    color: white;
    padding: 3px 6px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 3px;
    pointer-events: none;
    white-space: nowrap;
    transform: translate(-50%, -50%);
    z-index: 5;
}

#labels-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.north-indicator {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 5;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}
