/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
    background-color: #1a1a1a;
    color: #e0e0e0;
}

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

/* Hide Cesium credits */
.cesium-viewer-bottom {
    display: none !important;
}

.cesium-viewer .cesium-widget-credits {
    display: none !important;
}

/* Left Panel */
#left-panel {
    position: absolute;
    left: 10px;
    top: 10px;
    bottom: 10px;
    width: 350px;
    background-color: rgba(30, 30, 30, 0.95);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#left-panel h2 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #4fc3f7;
}

#left-panel h3 {
    font-size: 14px;
    margin-bottom: 8px;
    color: #81c784;
    border-bottom: 1px solid #444;
    padding-bottom: 4px;
}

#left-panel h4 {
    font-size: 12px;
    color: #aaa;
    margin-bottom: 5px;
}

/* Control group */
.control-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.control-group label {
    font-size: 12px;
    color: #bbb;
    min-width: 80px;
}

.control-group select {
    flex: 1;
    padding: 6px;
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 12px;
}

.control-group button {
    padding: 6px 12px;
    font-size: 12px;
}

/* Form fields */
.form-section {
    background-color: rgba(40, 40, 40, 0.6);
    padding: 10px;
    border-radius: 6px;
}

.form-field {
    margin-bottom: 10px;
}

.form-field label {
    display: block;
    font-size: 11px;
    color: #bbb;
    margin-bottom: 4px;
}

.form-field input,
.form-field textarea {
    width: 100%;
    padding: 6px;
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 12px;
    font-family: inherit;
}

.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    border-color: #4fc3f7;
}

/* Tool buttons */
#edit-tools {
    background-color: rgba(40, 40, 40, 0.6);
    padding: 10px;
    border-radius: 6px;
}

.tool-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tool-btn {
    padding: 10px;
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 4px;
    color: #e0e0e0;
    cursor: pointer;
    font-size: 12px;
    text-align: left;
    transition: all 0.2s;
}

.tool-btn:hover {
    background-color: #3a3a3a;
    border-color: #4fc3f7;
}

.tool-btn.active {
    background-color: #4fc3f7;
    color: #000;
    border-color: #4fc3f7;
}

#mode-indicator {
    margin-top: 8px;
    padding: 8px;
    background-color: #4fc3f7;
    color: #000;
    border-radius: 4px;
    font-size: 11px;
    text-align: center;
    font-weight: bold;
}

#mode-indicator.hidden {
    display: none;
}

/* Team sections */
.team-section {
    margin-bottom: 12px;
}

.team-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background-color: rgba(40, 40, 40, 0.8);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    border: 1px solid transparent;
}

.team-header:hover {
    background-color: rgba(50, 50, 50, 0.9);
}

.team-section[data-team="red"] .team-header {
    border-left: 3px solid #f44336;
}

.team-section[data-team="red"] .team-header:hover {
    border-color: #f44336;
}

.team-section[data-team="blue"] .team-header {
    border-left: 3px solid #4fc3f7;
}

.team-section[data-team="blue"] .team-header:hover {
    border-color: #4fc3f7;
}

.team-chevron {
    font-size: 10px;
    color: #aaa;
    transition: transform 0.3s ease;
    display: inline-block;
    width: 12px;
}

.team-section.collapsed .team-chevron {
    transform: rotate(-90deg);
}

.team-title {
    font-size: 13px;
    font-weight: 600;
    color: #e0e0e0;
    flex: 1;
}

.team-section[data-team="red"] .team-title {
    color: #ff8a80;
}

.team-section[data-team="blue"] .team-title {
    color: #80d8ff;
}

.team-content {
    max-height: 1000px;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 1;
    padding-top: 8px;
}

.team-section.collapsed .team-content {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
}

/* Objects list */
.object-section {
    background-color: rgba(40, 40, 40, 0.6);
    padding: 8px;
    border-radius: 6px;
    margin-bottom: 8px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.section-header h4 {
    margin-bottom: 0;
}

.add-btn {
    background-color: #4fc3f7;
    border: none;
    color: #000;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.add-btn:hover {
    background-color: #29b6f6;
    transform: scale(1.1);
}

.add-btn.active {
    background-color: #81c784;
}

.object-item {
    background-color: #2a2a2a;
    padding: 8px;
    margin-bottom: 6px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.object-item:hover {
    background-color: #3a3a3a;
    border-color: #4fc3f7;
}

.object-item.selected {
    border-color: #4fc3f7;
    background-color: #3a3a3a;
}

.object-name {
    font-size: 11px;
    color: #e0e0e0;
}

.object-delete {
    background-color: #e53935;
    border: none;
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 10px;
}

.object-delete:hover {
    background-color: #c62828;
}

/* Action buttons */
#actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.action-btn {
    flex: 1;
    padding: 10px;
    border: 1px solid #444;
    border-radius: 4px;
    background-color: #2a2a2a;
    color: #e0e0e0;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.action-btn:hover {
    background-color: #3a3a3a;
}

.action-btn.primary {
    background-color: #4caf50;
    border-color: #4caf50;
    color: white;
}

.action-btn.primary:hover {
    background-color: #45a049;
}

.action-btn.danger {
    background-color: #e53935;
    border-color: #e53935;
    color: white;
}

.action-btn.danger:hover {
    background-color: #c62828;
}

/* Right Panel */
#right-panel {
    position: absolute;
    right: 10px;
    top: 10px;
    bottom: 10px;
    width: 300px;
    background-color: rgba(30, 30, 30, 0.95);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
}

#right-panel h3 {
    font-size: 14px;
    margin-bottom: 12px;
    color: #4fc3f7;
    border-bottom: 1px solid #444;
    padding-bottom: 4px;
}

.no-selection {
    color: #888;
    font-size: 12px;
    text-align: center;
    padding: 20px;
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #4caf50;
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 4000;
    font-size: 14px;
    transition: opacity 0.3s;
}

.notification.hidden {
    display: none;
}

.notification.error {
    background-color: #e53935;
}

/* Custom map styles */
.leaflet-container {
    background-color: #1a1a1a;
}

/* Wind indicator */
#wind-indicator {
    background-color: rgba(40, 40, 40, 0.6);
    padding: 10px;
    border-radius: 6px;
}

#wind-indicator h3 {
    font-size: 12px;
    color: #81c784;
    border-bottom: 1px solid #444;
    padding-bottom: 4px;
    margin-bottom: 8px;
}

.wind-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

#wind-icon {
    width: 40px;
    height: 40px;
    transition: transform 0.3s ease;
}

#wind-speed-text {
    font-size: 13px;
    font-weight: 600;
    color: #e0e0e0;
    white-space: nowrap;
}

/* Scrollbar styling */
#left-panel::-webkit-scrollbar,
#right-panel::-webkit-scrollbar {
    width: 8px;
}

#left-panel::-webkit-scrollbar-track,
#right-panel::-webkit-scrollbar-track {
    background: #2a2a2a;
    border-radius: 4px;
}

#left-panel::-webkit-scrollbar-thumb,
#right-panel::-webkit-scrollbar-thumb {
    background: #4fc3f7;
    border-radius: 4px;
}

#left-panel::-webkit-scrollbar-thumb:hover,
#right-panel::-webkit-scrollbar-thumb:hover {
    background: #29b6f6;
}

/* Waypoint Editor Styles */
.waypoint-editor-subtitle {
    font-size: 11px;
    color: #81c784;
    margin: 0 0 12px 0;
    padding-bottom: 4px;
    border-bottom: 1px solid #444;
}

.waypoint-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.waypoint-item {
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 10px;
    transition: all 0.2s;
}

.waypoint-item:hover {
    border-color: #4fc3f7;
    background-color: #333;
}

.waypoint-item.base {
    border-color: #4caf50;
}

.waypoint-item.target {
    border-color: #f44336;
}

.waypoint-item.navigation {
    border-color: #ffa726;
}

.waypoint-item.loop {
    border-color: #9c27b0;
}

.waypoint-header {
    margin-bottom: 6px;
}

.waypoint-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    color: white;
}

.waypoint-badge.base {
    background-color: #4caf50;
}

.waypoint-badge.target {
    background-color: #f44336;
}

.waypoint-badge.navigation {
    background-color: #ffa726;
}

.waypoint-badge.loop {
    background-color: #9c27b0;
}

.waypoint-coords {
    font-size: 11px;
    color: #aaa;
    margin-bottom: 8px;
    font-family: 'Courier New', monospace;
}

.waypoint-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.waypoint-controls label {
    font-size: 11px;
    color: #bbb;
    min-width: 50px;
}

.waypoint-controls input {
    flex: 1;
    padding: 4px 6px;
    background-color: #1a1a1a;
    border: 1px solid #444;
    border-radius: 3px;
    color: #e0e0e0;
    font-size: 11px;
}

.waypoint-controls input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.waypoint-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.waypoint-btn {
    padding: 4px 8px;
    background-color: #3a3a3a;
    border: 1px solid #555;
    border-radius: 3px;
    color: #e0e0e0;
    cursor: pointer;
    font-size: 10px;
    transition: all 0.2s;
}

.waypoint-btn:hover {
    background-color: #4a4a4a;
    border-color: #4fc3f7;
}

.waypoint-delete {
    background-color: #e53935;
    border-color: #e53935;
    color: white;
}

.waypoint-delete:hover {
    background-color: #c62828;
    border-color: #c62828;
}

.waypoint-locked {
    font-size: 10px;
    color: #81c784;
    font-weight: 600;
}

.waypoint-editor-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.waypoint-editor-main-actions {
    display: flex;
    gap: 8px;
}

/* Waypoint markers on map */
.waypoint-marker {
    background: transparent;
    border: none;
}

.waypoint-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: white;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.waypoint-number.base {
    background-color: #4caf50;
}

.waypoint-number.target {
    background-color: #f44336;
}

.waypoint-number.navigation {
    background-color: #ffa726;
}

.waypoint-number.loop {
    background-color: #9c27b0;
}

.waypoint-number.loop-start {
    border-color: #ffc107;
    box-shadow: 0 0 0 3px #ffc107, 0 2px 6px rgba(0, 0, 0, 0.5);
}

/* Active state for buttons like toggle loop */
.action-btn.active {
    background-color: #ffc107;
    color: #000;
}

/* Property actions */
.property-actions {
    display: flex;
    gap: 8px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #444;
}

/* ========== Wizard Styles ========== */

/* Wizard Header */
#wizard-header {
    position: absolute;
    top: 10px;
    left: 370px;
    right: 320px;
    height: 50px;
    background-color: rgba(30, 30, 30, 0.95);
    border-radius: 8px;
    padding: 0 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 20px;
}

.wizard-title {
    font-size: 16px;
    font-weight: 600;
    color: #4fc3f7;
    white-space: nowrap;
}

.wizard-steps {
    display: flex;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.wizard-step {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    background-color: rgba(40, 40, 40, 0.6);
    border: 1px solid transparent;
}

.wizard-step:hover {
    background-color: rgba(50, 50, 50, 0.8);
}

.wizard-step.active {
    background-color: #4fc3f7;
    color: #000;
}

.wizard-step.completed {
    background-color: rgba(76, 175, 80, 0.3);
    border-color: #4caf50;
}

.step-number {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.wizard-step.active .step-number {
    background-color: rgba(0, 0, 0, 0.3);
    color: #fff;
}

.wizard-step.completed .step-number {
    background-color: #4caf50;
    color: #fff;
}

.step-name {
    font-size: 12px;
    white-space: nowrap;
}

.wizard-load {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wizard-load select {
    padding: 6px 10px;
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 12px;
    min-width: 150px;
}

.btn-danger {
    background-color: #c62828;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.btn-danger:hover:not(:disabled) {
    background-color: #e53935;
}

.btn-danger:disabled {
    background-color: #555;
    color: #888;
    cursor: not-allowed;
}

/* Left Panel adjustments for wizard */
#left-panel {
    top: 70px; /* Below wizard header */
}

/* Step Content */
.step-content {
    display: none;
    flex-direction: column;
    gap: 15px;
    flex: 1;
    overflow-y: auto;
}

.step-content.active {
    display: flex;
}

/* Wizard Footer */
#wizard-footer {
    display: flex;
    gap: 8px;
    padding-top: 15px;
    border-top: 1px solid #444;
    margin-top: auto;
}

.footer-spacer {
    flex: 1;
}

.nav-btn {
    padding: 10px 20px;
    border: 1px solid #444;
    border-radius: 4px;
    background-color: #2a2a2a;
    color: #e0e0e0;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.nav-btn:hover:not(:disabled) {
    background-color: #3a3a3a;
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.nav-btn.primary {
    background-color: #4fc3f7;
    border-color: #4fc3f7;
    color: #000;
}

.nav-btn.primary:hover:not(:disabled) {
    background-color: #29b6f6;
}

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

.nav-btn.success:hover:not(:disabled) {
    background-color: #45a049;
}

.nav-btn.hidden {
    display: none;
}

/* Tab Bar */
.tab-bar {
    display: flex;
    gap: 4px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 8px 16px;
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 4px 4px 0 0;
    color: #aaa;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.tab-btn:hover {
    background-color: #3a3a3a;
    color: #e0e0e0;
}

.tab-btn.active {
    background-color: #4fc3f7;
    border-color: #4fc3f7;
    color: #000;
}

.tab-btn .tab-close {
    margin-left: 6px;
    color: inherit;
    opacity: 0.6;
}

.tab-btn .tab-close:hover {
    opacity: 1;
}

/* Tab Content */
.tab-content {
    background-color: rgba(40, 40, 40, 0.4);
    border-radius: 0 4px 4px 4px;
    padding: 12px;
    min-height: 200px;
}

/* Empty State */
.empty-state {
    color: #666;
    font-size: 12px;
    text-align: center;
    padding: 20px;
    font-style: italic;
}

/* Objects Container */
.objects-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Entity Categories */
.entity-category {
    margin-bottom: 12px;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    background-color: rgba(50, 50, 50, 0.6);
    border-radius: 4px;
    margin-bottom: 6px;
}

.category-header span {
    font-size: 12px;
    font-weight: 600;
    color: #aaa;
}

.add-entity-btn {
    background-color: #4fc3f7;
    border: none;
    color: #000;
    width: 20px;
    height: 20px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-entity-btn:hover {
    background-color: #29b6f6;
}

.entities-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Larger add button with text */
.add-btn {
    width: auto;
    padding: 6px 12px;
    font-size: 12px;
}

/* Wave/Option specific styling */
.wave-info, .option-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wave-timing {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background-color: rgba(50, 50, 50, 0.4);
    border-radius: 4px;
}

.wave-timing label {
    font-size: 11px;
    color: #bbb;
}

.wave-timing input {
    padding: 4px 8px;
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 12px;
}

.wave-timing input[type="date"],
.wave-timing input[type="time"] {
    font-family: monospace;
    background: #2d2d2d;
    color: #e0e0e0;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 4px 8px;
}

/* Flights in wave */
.wave-flights {
    margin-top: 10px;
}

.wave-flights-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.wave-flights-header span {
    font-size: 12px;
    color: #81c784;
}

/* Review Summary */
.review-summary {
    background-color: rgba(40, 40, 40, 0.6);
    border-radius: 6px;
    padding: 15px;
}

.review-section {
    margin-bottom: 15px;
}

.review-section:last-child {
    margin-bottom: 0;
}

.review-section h4 {
    font-size: 12px;
    color: #4fc3f7;
    margin-bottom: 8px;
    border-bottom: 1px solid #444;
    padding-bottom: 4px;
}

.review-item {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    padding: 4px 0;
}

.review-item .label {
    color: #aaa;
}

.review-item .value {
    color: #e0e0e0;
    font-weight: 500;
}

/* Validation Results */
.validation-results {
    background-color: rgba(40, 40, 40, 0.6);
    border-radius: 6px;
    padding: 15px;
}

.validation-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 12px;
}

.validation-icon {
    font-size: 14px;
}

.validation-item.pass .validation-icon {
    color: #4caf50;
}

.validation-item.fail .validation-icon {
    color: #f44336;
}

.validation-item.warn .validation-icon {
    color: #ffa726;
}

/* Form row for side-by-side fields */
.form-row {
    display: flex;
    gap: 10px;
}

.form-field.half {
    flex: 1;
}

/* Right panel adjustment */
#right-panel {
    top: 70px; /* Below wizard header */
    bottom: 220px; /* Leave room for Cesium toolbar */
}

/* Mode indicator positioning */
#mode-indicator {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
}


/* ========== Asset Library Styles ========== */

/* Section Labels */
.section-label {
    font-size: 11px;
    font-weight: 600;
    color: #4fc3f7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 0 8px;
    margin-top: 8px;
}

.section-label:first-child {
    margin-top: 0;
    padding-top: 0;
}

/* Asset Accordion */
.asset-accordion {
    margin-bottom: 8px;
    border: 1px solid #444;
    border-radius: 4px;
    overflow: hidden;
}

.accordion-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background-color: #2a2a2a;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
}

.accordion-header:hover {
    background-color: #333;
}

.accordion-header.expanded {
    background-color: #333;
    border-bottom: 1px solid #444;
}

.accordion-icon {
    font-size: 10px;
    color: #888;
    transition: transform 0.2s;
    width: 12px;
}

.accordion-header.expanded .accordion-icon {
    transform: rotate(90deg);
}

.accordion-label {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    color: #e0e0e0;
}

.category-count {
    font-size: 11px;
    color: #888;
}

.accordion-content {
    background-color: #1a1a1a;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-content.expanded {
    max-height: 500px;
    overflow-y: auto;
}

/* Asset Model Row */
.asset-model-row {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid #333;
    gap: 10px;
}

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

.asset-model-row:hover {
    background-color: #252525;
}

.model-name {
    flex: 1;
    font-size: 13px;
    color: #e0e0e0;
}

.availability-badge {
    font-size: 11px;
    padding: 3px 8px;
    background-color: #4caf50;
    color: white;
    border-radius: 10px;
    font-weight: 500;
}

.availability-badge.low {
    background-color: #ffa726;
}

.availability-badge.depleted {
    background-color: #f44336;
}

.model-actions {
    display: flex;
    gap: 6px;
}

.model-actions .btn {
    padding: 5px 10px;
    font-size: 11px;
}

/* Small buttons */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.btn-small {
    padding: 5px 10px;
    font-size: 11px;
}

.btn-primary {
    background-color: #4fc3f7;
    color: #000;
}

.btn-primary:hover:not(:disabled) {
    background-color: #29b6f6;
}

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

.btn-secondary:hover:not(:disabled) {
    background-color: #666;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Deployed Assets */
#deployedAssets {
    margin-top: 8px;
}

.deployed-category {
    margin-bottom: 12px;
}

.deployed-category-header {
    font-size: 12px;
    color: #888;
    padding: 6px 0;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.deployed-category-count {
    font-size: 11px;
    color: #4fc3f7;
}

.deployed-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 6px;
}

.deployed-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    background-color: #2a2a2a;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.deployed-item:hover {
    background-color: #333;
    border-color: #4fc3f7;
}

.deployed-item.selected {
    background-color: #333;
    border-color: #4fc3f7;
}

.deployed-item-name {
    flex: 1;
    color: #e0e0e0;
}

.deployed-item-info {
    font-size: 11px;
    color: #888;
    margin-right: 10px;
}

.deployed-item-delete {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 16px;
    padding: 0 4px;
    transition: color 0.2s;
}

.deployed-item-delete:hover {
    color: #f44336;
}

.deployed-empty {
    color: #666;
    font-size: 11px;
    font-style: italic;
    padding: 10px;
    text-align: center;
}

/* ========== Modal Styles ========== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background-color: #2a2a2a;
    border-radius: 8px;
    width: 400px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #444;
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 500;
    color: #fff;
    margin: 0;
    border: none;
    padding: 0;
}

.modal-close {
    background: none;
    border: none;
    color: #888;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: #fff;
}

.modal-body {
    padding: 20px;
}

.modal-body .form-group {
    margin-bottom: 15px;
}

.modal-body .form-group:last-child {
    margin-bottom: 0;
}

.modal-body .form-group label {
    display: block;
    font-size: 12px;
    color: #bbb;
    margin-bottom: 6px;
}

.modal-body .form-group input,
.modal-body .form-group select {
    width: 100%;
    padding: 10px 12px;
    background-color: #1a1a1a;
    border: 1px solid #444;
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 13px;
}

.modal-body .form-group input:focus,
.modal-body .form-group select:focus {
    outline: none;
    border-color: #4fc3f7;
}

.modal-body .form-group small {
    display: block;
    font-size: 11px;
    color: #888;
    margin-top: 4px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid #444;
}

/* Patrol options visibility */
#patrolOptions.hidden {
    display: none;
}

#circularOptions.hidden {
    display: none;
}

/* Fighter group badge on map */
.fighter-group-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #4fc3f7;
    color: #000;
    font-size: 10px;
    font-weight: bold;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #1a1a1a;
}

/* Patrol route visualization */
.patrol-route {
    stroke: #4fc3f7;
    stroke-width: 2;
    stroke-dasharray: 8, 4;
    fill: none;
    opacity: 0.7;
}

.patrol-route.selected {
    stroke-width: 3;
    opacity: 1;
}

/* ========== HVA Preset Styles ========== */

/* HVA Preset Buttons */
.hva-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.preset-btn {
    background-color: #3a3a3a;
    border: 1px solid #555;
    border-radius: 4px;
    color: #e0e0e0;
    padding: 4px 10px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
}

.preset-btn:hover {
    background-color: #4a4a4a;
    border-color: #4fc3f7;
}

/* Preset Modal Styles */
.preset-summary {
    background-color: rgba(79, 195, 247, 0.1);
    border: 1px solid #4fc3f7;
    border-radius: 4px;
    padding: 10px;
    margin-top: 10px;
    font-size: 12px;
    color: #4fc3f7;
}

.preset-preview {
    background-color: #1a1a1a;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 10px;
    margin-top: 10px;
    max-height: 200px;
    overflow-y: auto;
}

.preview-header {
    font-size: 11px;
    color: #888;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.preview-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.preview-item {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    padding: 4px 8px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.preview-item-name {
    color: #e0e0e0;
}

.preview-item-type {
    color: #888;
    font-size: 11px;
}

.load-options {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #bbb;
    cursor: pointer;
}

.radio-label input[type="radio"] {
    margin: 0;
}

#hvaPresetDeleteBtn {
    margin-right: auto;
}

/* Modal body textarea */
.modal-body textarea {
    width: 100%;
    padding: 10px 12px;
    background-color: #1a1a1a;
    border: 1px solid #444;
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
}

.modal-body textarea:focus {
    outline: none;
    border-color: #4fc3f7;
}

/* ========== Base Preset Styles ========== */

/* Wide modal for base presets */
.modal-content.modal-wide {
    width: 500px;
}

/* Preset select row with manage button */
.preset-select-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.preset-select-row select {
    flex: 1;
}

/* Base selection list (radio buttons) */
.base-selection-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #444;
    border-radius: 4px;
    background-color: #1a1a1a;
}

.base-selection-item {
    border-bottom: 1px solid #333;
}

.base-selection-item:last-child {
    border-bottom: none;
}

.base-radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.base-radio-label:hover {
    background-color: #252525;
}

.base-radio-label input[type="radio"] {
    margin: 0;
    accent-color: #4fc3f7;
}

.base-item-name {
    flex: 1;
    font-size: 13px;
    color: #e0e0e0;
}

.base-item-coords {
    font-size: 11px;
    color: #888;
    font-family: monospace;
}

/* Base edit list */
.base-edit-list {
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid #444;
    border-radius: 4px;
    background-color: #1a1a1a;
    margin-bottom: 10px;
}

.base-edit-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid #333;
}

.base-edit-item:last-child {
    border-bottom: none;
}

.base-edit-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.base-name-input {
    width: 100%;
    padding: 6px 8px;
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 3px;
    color: #e0e0e0;
    font-size: 12px;
}

.base-name-input:focus {
    outline: none;
    border-color: #4fc3f7;
}

.base-edit-coords {
    font-size: 10px;
    color: #888;
    font-family: monospace;
}

.base-edit-delete {
    background: none;
    border: none;
    color: #888;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s;
}

.base-edit-delete:hover {
    color: #f44336;
}

.base-count-badge {
    display: inline-block;
    background-color: #4fc3f7;
    color: #000;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 6px;
}

/* Preset Manager Modal */
.preset-manager-list {
    max-height: 300px;
    overflow-y: auto;
}

.preset-manager-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background-color: #2a2a2a;
    border-radius: 4px;
    margin-bottom: 8px;
}

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

.preset-manager-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.preset-manager-name {
    font-size: 13px;
    font-weight: 500;
    color: #e0e0e0;
}

.preset-manager-count {
    font-size: 11px;
    color: #888;
}

.preset-manager-actions {
    display: flex;
    gap: 6px;
}

/* Delete button in base preset modals */
#deleteBasePresetBtn {
    margin-right: auto;
}

/* ========== Base Inventory Styles ========== */

/* Inventory summary at top of modal */
.inventory-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background-color: rgba(79, 195, 247, 0.1);
    border: 1px solid #4fc3f7;
    border-radius: 4px;
    margin-bottom: 12px;
}

#inventoryTotalUnits {
    font-size: 14px;
    font-weight: 600;
    color: #4fc3f7;
}

#inventoryTypeCount {
    font-size: 12px;
    color: #888;
}

/* Inventory edit list container */
.inventory-edit-list {
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid #444;
    border-radius: 4px;
    background-color: #1a1a1a;
    margin-bottom: 12px;
}

.inventory-empty-state {
    padding: 20px;
    text-align: center;
    color: #666;
    font-size: 12px;
    font-style: italic;
}

/* Individual inventory item row */
.inventory-edit-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid #333;
}

.inventory-edit-item:last-child {
    border-bottom: none;
}

.inventory-edit-item:hover {
    background-color: #252525;
}

.inventory-model-name {
    flex: 1;
    font-size: 13px;
    color: #e0e0e0;
}

.inventory-model-role {
    font-size: 11px;
    color: #888;
    padding: 2px 6px;
    background-color: #333;
    border-radius: 3px;
    text-transform: uppercase;
}

.inventory-qty-input {
    width: 70px;
    padding: 6px 8px;
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 13px;
    text-align: center;
}

.inventory-qty-input:focus {
    outline: none;
    border-color: #4fc3f7;
}

.inventory-item-delete {
    background: none;
    border: none;
    color: #888;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s;
}

.inventory-item-delete:hover {
    color: #f44336;
}

/* Add inventory item row */
.inventory-add-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
}

.inventory-add-row select {
    flex: 1;
    padding: 8px 10px;
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 12px;
}

.inventory-add-row select:focus {
    outline: none;
    border-color: #4fc3f7;
}

#inventoryQtyInput {
    width: 70px;
    padding: 8px;
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 12px;
    text-align: center;
}

/* Inventory button in base edit list */
.btn-inventory-edit {
    background-color: #3a3a3a;
    border: 1px solid #555;
    border-radius: 4px;
    color: #e0e0e0;
    padding: 4px 8px;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-inventory-edit:hover {
    background-color: #4a4a4a;
    border-color: #4fc3f7;
}

.btn-inventory-edit.has-inventory {
    background-color: rgba(76, 175, 80, 0.2);
    border-color: #4caf50;
    color: #81c784;
}

/* Inventory indicator badge */
.inventory-indicator {
    font-size: 10px;
    color: #888;
    margin-left: 4px;
}

.inventory-indicator.has-items {
    color: #81c784;
}

/* ========== Depleted UAV Option Styles ========== */

/* Depleted UAV option styling in dropdown */
#baseUavModel option:disabled {
    color: #888;
    font-style: italic;
    background-color: #1a1a1a;
}
