/* ================================================================
   AERIAL RECOGNITION — Modal UI components
   ================================================================ */

/* Fix: flex column para footer sempre visivel no fundo do modal */
#aerial-recognition-modal .modal {
    display: flex;
    flex-direction: column;
    max-height: 85vh;
}

/* Body ocupa espaco restante (flex grow) e faz scroll interno */
#aerial-recognition-modal .modal-body {
    flex: 1;
    overflow-y: auto;
    max-height: none;
}

/* Canvas preview — fill modal width, high quality rendering */
#aerial-preview-canvas {
    width: 100%;
    border-radius: var(--radius-lg);
    border: 1px solid var(--neutral-700, #444);
    cursor: crosshair;
    image-rendering: auto;
}

/* Feature summary pills — colored chips showing family counts */
.aerial-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 0;
}

.aerial-summary-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    background: var(--neutral-800, #262626);
    border: 1px solid var(--neutral-700, #404040);
    color: var(--window-text);
}

.aerial-summary-pill .pill-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Feature row — detected features list */
.aerial-feature-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 6px;
    border-radius: var(--radius-md);
    transition: background 0.1s;
    border-left: 3px solid transparent;
}

.aerial-feature-row:hover {
    background: var(--neutral-800, #262626);
}

.aerial-feature-row.selected {
    border-left-color: var(--primary-500, #3b82f6);
    background: rgba(59, 130, 246, 0.05);
}

.aerial-feature-row .feature-conf {
    font-size: 11px;
    font-weight: 600;
    min-width: 34px;
    text-align: right;
    padding: 1px 4px;
    border-radius: 3px;
}

.aerial-feature-row .feature-conf.high { color: #22c55e; background: rgba(34, 197, 94, 0.1); }
.aerial-feature-row .feature-conf.medium { color: #f59e0b; background: rgba(245, 158, 11, 0.1); }
.aerial-feature-row .feature-conf.low { color: #ef4444; background: rgba(239, 68, 68, 0.1); }

/* Annotation row — user-placed annotations */
.aerial-annotation-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    border-radius: var(--radius-md);
    border-left: 3px solid transparent;
    transition: background 0.1s;
}

.aerial-annotation-row:hover {
    background: var(--neutral-800, #262626);
}

.aerial-annotation-row .annot-index {
    font-size: 10px;
    font-weight: 700;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    flex-shrink: 0;
}

.aerial-annotation-row .annot-remove {
    padding: 2px;
    background: transparent;
    border: none;
    color: var(--window-muted);
    cursor: pointer;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    opacity: 0;
    transition: opacity 0.15s;
}

.aerial-annotation-row:hover .annot-remove {
    opacity: 1;
}

.aerial-annotation-row .annot-remove:hover {
    color: var(--error, #ef4444);
    background: rgba(239, 68, 68, 0.1);
}

/* Paint family buttons — User NN method */
.paint-family-btn {
    transition: background 0.15s, border-color 0.15s;
}
.paint-family-btn.paint-family-selected {
    border-width: 2px;
    font-weight: 600;
}

/* Section headers inside aerial modal */
.aerial-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.aerial-section-header h3 {
    font-size: 12px;
    font-weight: 600;
    margin: 0;
    color: var(--window-text);
    display: flex;
    align-items: center;
    gap: 6px;
}

.aerial-section-header .section-count {
    font-weight: 400;
    color: var(--window-muted);
}

/* Analyze button area */
.aerial-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

/* ================================================================
   GEOREF MODAL — GCP-based image registration
   ================================================================ */

/* Spinner for AI suggest button loading state */
@keyframes georef-spin {
    to { transform: rotate(360deg); }
}

.georef-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid var(--neutral-600, #555);
    border-top-color: var(--text-primary, #fff);
    border-radius: 50%;
    animation: georef-spin 0.8s linear infinite;
}

/* GCP row in footer — highlight active point */
.georef-gcp-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px 4px;
    border-left: 3px solid transparent;
    border-radius: 2px;
    transition: background 0.1s;
}

.georef-gcp-row:hover {
    background: var(--neutral-800, #262626);
}

.georef-gcp-row.gcp-active {
    border-left-color: var(--primary-500, #3b82f6);
    background: rgba(59, 130, 246, 0.1);
}

.georef-gcp-row.gcp-complete .gcp-id { color: #22c55e; }
.georef-gcp-row.gcp-incomplete .gcp-id { color: #ef4444; }

.georef-gcp-row .gcp-id {
    font-weight: 600;
    min-width: 20px;
}

.georef-gcp-row .gcp-label {
    font-size: 10px;
    color: var(--window-muted, #888);
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.georef-gcp-row .gcp-delete {
    background: none;
    border: none;
    color: var(--error, #ef4444);
    cursor: pointer;
    font-size: 14px;
    padding: 0 4px;
    opacity: 0;
    transition: opacity 0.15s;
}

.georef-gcp-row:hover .gcp-delete {
    opacity: 1;
}

/* Preview toggle button */
.georef-preview-toggle {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 3px;
    border: 1px solid var(--border-color, #444);
    background: transparent;
    color: var(--text-secondary, #888);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.georef-preview-toggle.active {
    background: var(--primary-500, #3b82f6);
    color: #fff;
    border-color: var(--primary-500, #3b82f6);
}

/* Responsive: stacked layout for narrow viewports */
@media (max-width: 800px) {
    .georef-left-pane,
    .georef-right-pane {
        width: 100% !important;
        min-width: 0 !important;
    }
}

