/* ============================================================
   TOOLS PANEL – ESTILO PROFESIONAL (coherente con Gráficos)
   ============================================================ */

.tools-panel {
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
    padding: 8px 4px;
    font-size: 14px;
}

/* Títulos */
.tp-title {
    font-weight: 600;
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: -4px;
}

/* Secciones */
.tp-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ============================================================
   INPUTS
   ============================================================ */
.tp-input {
    width: 100%;
    height: 36px;
    padding: 6px 10px;
    border-radius: 5px;
    background: #2f2f2f;
    border: 1px solid #555;
    color: #e5e5e5;
    font-size: 13px;
    transition: border 0.15s, background 0.15s;
}
.tp-input:focus {
    outline: none;
    border-color: #00d2ff;
}

/* ============================================================
   BOTONES BASE
   ============================================================ */
.tp-btn {
    padding: 10px;
    border-radius: 5px;
    border: none;
    width: 100%;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s, transform 0.07s;
    font-size: 13px;
}
.tp-btn:active { transform: scale(0.95); }

/* ============================================================
   BOTONES DE DIBUJO (iconos)
   ============================================================ */
.tp-draw-buttons {
    display: flex;
    gap: 8px;
}

.tp-btn-icon {
    flex: 1;
    height: 38px;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;

    background: #2a2a2a;
    color: #eaeaea;
    border: 1px solid #444;
    border-radius: 5px;

    cursor: pointer;
    transition: background 0.2s, border 0.2s, transform 0.07s;
}

.tp-btn-icon:hover {
    background: #3a3a3a;
    border-color: #666;
}

.tp-btn-icon:active {
    transform: scale(0.93);
}

/* Modo activo */
.active-mode {
    background: #008cc4 !important;
    border-color: #00bfff !important;
    color: white !important;
}

/* ============================================================
   BOTONES DESHACER Y LIMPIAR
   ============================================================ */
.tp-actions-row {
    display: flex;
    flex-direction: row;
    gap: 10px;
    width: 100%;
}

/* Botón Deshacer */
.tp-btn-undo {
    height: 38px;
    background: #ffffff;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 5px;
}
.tp-btn-undo:hover {
    background: #008cc4;
    color: white;
    border-color: #009fe3;
}

/* Botón Limpiar */
.tp-btn-clear {
    height: 38px;
    background: #b33939;
    color: #ffffff;
    border-radius: 5px;
}
.tp-btn-clear:hover {
    background: #d64545;
}

/* ============================================================
   AUTOCOMPLETADO
   ============================================================ */
.tp-search-suggestions {
    margin-top: 4px;
    background: #222;
    border: 1px solid #444;
    border-radius: 5px;
    max-height: 150px;
    overflow-y: auto;
    display: none;
}

.tp-suggestion-item {
    padding: 7px 10px;
    cursor: pointer;
    color: #e0e0e0;
    font-size: 13px;
}
.tp-suggestion-item:hover {
    background: #333;
}

/* Filas */
.tp-search-row,
.tp-coord-row {
    display: flex;
    gap: 10px;
}

/* ============================================================
   CURSOR PERSONALIZADO DURANTE MEDICIÓN
   ============================================================ */
.cursor-measure {
    cursor: url("data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjE2IiB3aWR0aD0iMTYiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHNpcmNsZSBjeD0iMTIiIGN5PSIxMiIgcj0iNSIgZmlsbD0iI2M2ZjliNSIvPjwvc3ZnPg==") 8 8, crosshair !important;
}

/* Fila para input + botón */
.tp-row {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
    width: 100%;
}

/* Botón pequeño alineado a la derecha */
.tp-btn-inline {
    width: auto !important;
    flex: 0 0 auto;
    height: 40px;
    padding: 0 18px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;

    display: flex;
    justify-content: flex-end;
    align-items: center;
}

/* SUBIR CAPA GEOJSON */
#tp-upload-file {
    background: #2d2d2d;
    border: 1px solid #555;
    padding: 8px;
    color: #ddd;
}
#tp-upload-file::-webkit-file-upload-button {
    background: #444;
    color: #eee;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
}
#tp-upload-file::-webkit-file-upload-button:hover {
    background: #666;
}
