/* Essential canvas and positioning that can't be replaced with Tailwind */
body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: Arial, sans-serif;
    height: 100vh;
    width: 100vw;
}

#layoutCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: crosshair;
    touch-action: none;
    display: block;
}

.bt-bubble.selected {
    background-color: #a3e635;
}

/* Animation for entity placement */
@keyframes entityPlace {
    0% { transform: scale(0.5); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

.entity-placed {
    animation: entityPlace 0.3s ease-out;
}

/* Custom scrollbar */
#cityList {
    scrollbar-width: thin;
    scrollbar-color: rgba(156, 163, 175, 0.5) transparent;
}

#cityList::-webkit-scrollbar {
    width: 6px;
}

#cityList::-webkit-scrollbar-track {
    background: transparent;
}

#cityList::-webkit-scrollbar-thumb {
    background-color: rgba(156, 163, 175, 0.5);
    border-radius: 3px;
}

#cityList::-webkit-scrollbar-thumb:hover {
    background-color: rgba(156, 163, 175, 0.8);
}

/* Button hover effects */
.floating-panel button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.floating-panel button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Toolbar button original colors */
#toolbar-controls button[data-type="select"] {
  background-color: #6b7280;
}

#toolbar-controls button[data-type="move"] {
  background-color: #8b5cf6;
}

#toolbar-controls button#deleteButton {
  background-color: #ef4444;
}

/* Selected state */
#toolbar-controls button.bg-yellow-500,
#toolbar-buildings button.bg-yellow-500 {
  background-color: #eab308;
}

/* Prevent text selection while resizing */
#sidebarResizer {
    user-select: none;
    -webkit-user-select: none;
}

/* Prevent text selection while resizing */
body.resizing {
    cursor: ew-resize !important;
    user-select: none;
    -webkit-user-select: none;
}

/* Bottom Section Styles */
#helpSection,
#actionsSection {
    max-height: 70vh;
    overflow-y: auto;
    transform-origin: top;
    transition: max-height 0.2s ease-out;
}

#helpSection.hidden,
#actionsSection.hidden {
    max-height: 0;
    overflow: hidden;
    padding-top: 0;
    padding-bottom: 0;
}

/* Mobile Panel Styles */
.mobile-panel {
    position: fixed;
    bottom: 60px;
    left: 0;
    right: 0;
    background-color: white;
    transform: translateY(100%);
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    z-index: 40;
    max-height: 80vh;
    overflow-y: auto;
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
    visibility: hidden;
    opacity: 0;
}

.mobile-panel.active {
    transform: translateY(0);
    visibility: visible;
    opacity: 1;
}

@media (min-width: 768px) {
    #mobileNav, #mobilePanels {
        display: none !important;
    }
}

@media (max-width: 767px) {
    #rightSidebar {
        display: none;
    }
    #topControls {
        margin-left: 0;
        margin-right: 0 !important;
    }
    #toolbar-controls {
        width: 100%;
        justify-content: center;
    }
    #toolbar-controls button {
        flex: 1;
        min-width: 0;
        padding: 0.5rem 0.25rem;
    }
}