﻿/* Obras Públicas · Ubicación de obras (SIIAR) v2.0.0 — estilos del editor, la ayuda y los mapas de consulta */

.ou-editor { font-size: .9rem; color: #333; }
.ou-editor [hidden] { display: none !important; }

/* Barra de herramientas */
.ou-barra { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; }
.ou-grupo { display: flex; flex-wrap: wrap; gap: 4px; padding-right: 6px; border-right: 1px solid #e3e3e3; }
.ou-grupo.ou-derecha { border-right: 0; margin-left: auto; padding-right: 0; }
.ou-btn {
    display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; margin: 0;
    border: 1px solid #d0d0d0; background: #fff; color: #444; border-radius: 6px;
    font-size: .8rem; line-height: 1.25; cursor: pointer; text-decoration: none !important;
    transition: background .15s, color .15s, border-color .15s;
}
.ou-btn:hover:not(:disabled) { border-color: #9d1d36; color: #9d1d36; background: #fdf5f7; }
.ou-btn:focus-visible { outline: 2px solid #9d1d36; outline-offset: 1px; }
.ou-btn.ou-activo, .ou-btn.ou-activo:hover { background: #9d1d36; border-color: #9d1d36; color: #fff; }
.ou-btn:disabled { opacity: .45; cursor: not-allowed; }
.ou-btn span { white-space: nowrap; }
.ou-btn-ayuda { border-color: #9d1d36; color: #9d1d36; }

/* Búsqueda y opciones */
.ou-subbarra { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 6px; }
.ou-buscar { display: flex; flex: 1 1 260px; }
.ou-buscar input { flex: 1; min-width: 0; border: 1px solid #d0d0d0; border-radius: 6px 0 0 6px; padding: 5px 9px; font-size: .85rem; }
.ou-buscar input:focus { outline: none; border-color: #9d1d36; }
.ou-buscar .ou-btn { border-radius: 0 6px 6px 0; border-left: 0; }
.ou-opcion { margin: 0; font-size: .82rem; display: flex; align-items: center; gap: 5px; cursor: pointer; }
.ou-opcion small { color: #888; }

/* Mapa y estado */
.ou-mapa { width: 100%; border: 1px solid #d0d0d0; border-radius: 8px 8px 0 0; background: #eef0f2; }
.ou-estado { background: #2f3b45; color: #fff; padding: 6px 10px; font-size: .8rem; border-radius: 0 0 8px 8px; min-height: 30px; }
.ou-error-mapa { display: flex; align-items: center; justify-content: center; height: 100%; padding: 20px; text-align: center; color: #8a1c2b; background: #fde8ea; }

/* Mensajes */
.ou-mensajes { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; padding: 8px 10px; border-radius: 6px; margin-bottom: 6px; font-size: .85rem; }
.ou-mensajes button { background: none; border: 0; font-size: 1.2rem; line-height: 1; color: inherit; cursor: pointer; padding: 0 2px; }
.ou-mensajes.ou-info { background: #e8f1fb; color: #1d4f7a; }
.ou-mensajes.ou-ok { background: #e6f4ea; color: #1e5e2e; }
.ou-mensajes.ou-aviso { background: #fff4d6; color: #6b4a00; }
.ou-mensajes.ou-error { background: #fde8ea; color: #8a1c2b; }

/* Zona y leyenda */
.ou-pie { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin: 6px 0; font-size: .82rem; }
.ou-zona .fa-check-circle { color: #2e7d32; }
.ou-zona .fa-exclamation-triangle { color: #b26a00; }
.ou-leyenda { display: flex; flex-wrap: wrap; gap: 10px; color: #555; }
.ou-ley i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; opacity: .8; }
.ou-enlace { background: none; border: 0; color: #9d1d36; text-decoration: underline; cursor: pointer; padding: 0; font-size: inherit; }

/* Lista de elementos */
.ou-lista-titulo { font-weight: 600; margin: 8px 0 4px; color: #9d1d36; }
.ou-lista { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow: auto; border: 1px solid #eee; border-radius: 6px; background: #fff; }
.ou-item { display: flex; gap: 8px; align-items: flex-start; padding: 7px 8px; border-bottom: 1px solid #f0f0f0; cursor: pointer; }
.ou-item:last-child { border-bottom: 0; }
.ou-item:hover { background: #fafafa; }
.ou-item.ou-sel { background: #fff6e5; box-shadow: inset 3px 0 0 #ff8f00; }
.ou-num { flex: 0 0 22px; height: 22px; border-radius: 50%; color: #fff; font-size: .75rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.ou-item-cuerpo { flex: 1; min-width: 0; }
.ou-item-titulo { font-weight: 600; }
.ou-item-titulo small { font-weight: 400; color: #777; }
.ou-item-dir { font-size: .8rem; color: #555; overflow-wrap: anywhere; }
.ou-item-medida { font-size: .76rem; color: #777; }
.ou-item-acciones { display: flex; }
.ou-item-acciones button { background: none; border: 0; color: #777; padding: 2px 6px; cursor: pointer; }
.ou-item-acciones button:hover { color: #9d1d36; }
.ou-vacio { padding: 12px; color: #777; font-size: .85rem; }
.ou-tenue { color: #999; }

/* Modo de pruebas */
.ou-banda-prueba {
    background: repeating-linear-gradient(45deg, #fff3cd, #fff3cd 10px, #ffe69c 10px, #ffe69c 20px);
    color: #5d4037; padding: 6px 10px; border-radius: 6px; margin-bottom: 6px; font-weight: 600; font-size: .85rem;
}
.ou-etiqueta-prueba { background: #ffc107; color: #5d4037; border-radius: 4px; padding: 0 5px; font-size: 11px; font-weight: 700; }

/* Ayuda */
.ou-ayuda { margin-top: 10px; border: 1px solid #e0d2d6; border-radius: 8px; background: #fffdfd; }
.ou-ayuda header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px; padding: 8px 10px; border-bottom: 1px solid #f0e4e7; background: #fbf3f5; border-radius: 8px 8px 0 0; }
.ou-ayuda h6 { margin: 0; color: #9d1d36; font-weight: 700; font-size: .95rem; }
.ou-ayuda-acciones { display: flex; flex-wrap: wrap; gap: 4px; }
.ou-ayuda-contenido { padding: 6px 12px 12px; max-height: 520px; overflow: auto; font-size: .86rem; line-height: 1.45; }
.ou-ayuda-contenido p { margin: 4px 0 6px; }
.ou-ayuda-contenido ul, .ou-ayuda-contenido ol { margin: 4px 0 8px; padding-left: 1.4em; }
.ou-ayuda-contenido li { margin-bottom: 3px; }
.ou-ayuda-seccion { border-bottom: 1px solid #f2f2f2; padding: 4px 0; }
.ou-ayuda-seccion:last-child { border-bottom: 0; }
.ou-ayuda-seccion summary { cursor: pointer; font-weight: 600; color: #7a1629; padding: 4px 0; }
.ou-ayuda-seccion summary i { width: 18px; text-align: center; margin-right: 4px; }
.ou-ayuda-nota { background: #ebf4fc; padding: 6px 9px; border-radius: 6px; margin: 6px 0; }
.ou-ayuda-aviso { background: #fff3cd; padding: 6px 9px; border-radius: 6px; margin: 6px 0; }
.ou-ayuda-version { color: #888; font-size: .78rem; margin: 4px 0; }

/* Ventana de información en mapas de consulta */
.ou-info { font-family: inherit; }
.ou-info h5 { color: #9d1d36; font-size: 14px; margin: 0 0 6px; }
.ou-info table { font-size: 12px; max-width: 380px; }
.ou-info th { padding: 2px 6px 2px 0; vertical-align: top; white-space: nowrap; }
.ou-info td { padding: 2px 0; }

@media (max-width: 575px) {
    .ou-barra .ou-btn span { display: none; }
    .ou-grupo { border-right: 0; }
}

@media print {
    .ou-barra, .ou-subbarra, .ou-ayuda-acciones { display: none !important; }
    .ou-ayuda-contenido { max-height: none; overflow: visible; }
}
