/* ACO Configurator Styles */

/* Base */
body {
    margin: 0;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    background: #1a1a2e;
    color: #e0e0e0;
}

#cesiumContainer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

/* Top Tabs */
.top-tabs {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: #16213e;
    border-bottom: 1px solid #333;
    display: flex;
    align-items: center;
    z-index: 1000;
    padding: 0 10px;
    gap: 5px;
}

.top-tabs .home-link {
    color: #e0e0e0;
    text-decoration: none;
    font-size: 18px;
    padding: 0 10px;
}

.top-tabs .home-link:hover {
    color: #4a9eff;
}

.top-tabs .tab-btn {
    background: none;
    border: none;
    color: #888;
    padding: 8px 16px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    font-size: 14px;
}

.top-tabs .tab-btn.active {
    color: #4a9eff;
    border-bottom-color: #4a9eff;
}

.top-tabs .tab-btn:hover {
    color: #e0e0e0;
}

/* Panels */
#aco-list-panel {
    position: fixed;
    top: 50px;
    left: 10px;
    width: 300px;
    max-height: calc(100vh - 70px);
    background: rgba(22, 33, 62, 0.95);
    border: 1px solid #333;
    border-radius: 8px;
    z-index: 500;
    overflow-y: auto;
}

#aco-editor-panel {
    position: fixed;
    top: 50px;
    right: 10px;
    width: 360px;
    max-height: calc(100vh - 70px);
    background: rgba(22, 33, 62, 0.95);
    border: 1px solid #333;
    border-radius: 8px;
    z-index: 500;
    overflow-y: auto;
    display: none;
}

/* Panel headers */
.panel-header {
    padding: 12px 15px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h3 {
    margin: 0;
    font-size: 14px;
}

/* ACO list items */
.aco-list-item {
    padding: 10px 15px;
    border-bottom: 1px solid #2a2a3e;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.aco-list-item:hover {
    background: rgba(74, 158, 255, 0.1);
}

.aco-list-item.selected {
    background: rgba(74, 158, 255, 0.2);
}

.aco-list-item .aco-item-name {
    flex: 1;
    font-size: 13px;
}

.active-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4caf50;
    flex-shrink: 0;
}

/* Editor sections */
.editor-section {
    border-bottom: 1px solid #2a2a3e;
    padding: 12px 15px;
}

.editor-section h4 {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #888;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Form inputs */
.form-group {
    margin-bottom: 10px;
}

.form-group label {
    display: block;
    font-size: 12px;
    color: #888;
    margin-bottom: 4px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 6px 10px;
    background: #2a2a3e;
    border: 1px solid #444;
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 13px;
    box-sizing: border-box;
}

.form-group input[type="color"] {
    width: 60px;
    height: 30px;
    padding: 2px;
    cursor: pointer;
}

.form-group textarea {
    resize: vertical;
    min-height: 50px;
}

/* Buttons */
.btn {
    padding: 6px 14px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.btn-primary {
    background: #4a9eff;
    color: white;
}

.btn-primary:hover {
    background: #3a8eef;
}

.btn-danger {
    background: #ff4444;
    color: white;
}

.btn-danger:hover {
    background: #ee3333;
}

.btn-secondary {
    background: #555;
    color: #e0e0e0;
}

.btn-secondary:hover {
    background: #666;
}

.btn-small {
    padding: 3px 8px;
    font-size: 11px;
}

.btn-success {
    background: #4caf50;
    color: white;
}

.btn-success:hover {
    background: #3d9e41;
}

/* Status badges */
.status-badge {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: bold;
}

.status-OPEN {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

.status-RESTRICTED {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

.status-PROHIBITED {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
}

/* Sub-items (zones, corridors, blocks) */
.sub-item {
    padding: 8px 10px;
    background: #1e2a4a;
    border-radius: 4px;
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sub-item-name {
    font-size: 13px;
    flex: 1;
}

.sub-item-actions {
    display: flex;
    gap: 4px;
}

/* Altitude visual stack */
#altitude-visual {
    height: 150px;
    background: #1e2a4a;
    border-radius: 4px;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
}

.alt-block-bar {
    position: absolute;
    left: 0;
    right: 0;
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

/* Altitude block inline editor */
.alt-block-item {
    padding: 8px 10px;
    background: #1e2a4a;
    border-radius: 4px;
    margin-bottom: 6px;
}

.alt-block-item .alt-block-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.alt-block-item input,
.alt-block-item select {
    padding: 4px 6px;
    background: #2a2a3e;
    border: 1px solid #444;
    border-radius: 3px;
    color: #e0e0e0;
    font-size: 12px;
}

.alt-block-item input[type="text"] {
    flex: 1;
    min-width: 0;
}

.alt-block-item input[type="number"] {
    width: 70px;
}

.alt-block-item select {
    width: 100px;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-panel {
    background: #16213e;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 20px;
    width: 400px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-panel h3 {
    margin: 0 0 15px 0;
}

.modal-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 15px;
}

/* Drawing mode indicator */
#draw-mode-indicator {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(74, 158, 255, 0.9);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    z-index: 1500;
    font-size: 13px;
    display: none;
}

/* Notification toast */
#notification {
    position: fixed;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    border-radius: 6px;
    z-index: 3000;
    font-size: 13px;
    display: none;
    transition: opacity 0.3s;
}

#notification.success {
    background: rgba(76, 175, 80, 0.9);
    color: white;
}

#notification.error {
    background: rgba(244, 67, 54, 0.9);
    color: white;
}

#notification.info {
    background: rgba(74, 158, 255, 0.9);
    color: white;
}

/* Action bar */
.action-bar {
    padding: 12px 15px;
    display: flex;
    gap: 8px;
    border-top: 1px solid #333;
}

/* Count badges */
.count-badge {
    background: #2a2a3e;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 11px;
    color: #888;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}
