/**
 * Nacex Nacex Logista module — NacexShop selector.
 *
 * @author    Nacex
 * @copyright Since 2026 Nacex
 * @license   Proprietary
 */

.hook-display-before-carrier { width: 100% !important; }
.nacexshop-shell { width: 100%; margin: 10px 0 14px; }

/* Legacy containers — prevent OPC from adding visible border/padding when hidden */
.contenido-lista-puntos-nacexshop {
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    min-height: 0 !important;
    outline: none !important;
    box-shadow: none !important;
}
.respuesta_lista_puntos_nacexshop {
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    min-height: 0 !important;
    outline: none !important;
    box-shadow: none !important;
}
.nacexshop-shell.is-detached { display: none; }

/* ── Banner punto seleccionado ── */
.nxs-selected-banner {
    display: none;
    align-items: flex-start;
    gap: 8px;
    background: #fff8f3;
    border: 2px solid #f26c21;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.nxs-selected-banner.has-selection { display: flex; }
.nxs-selected-banner .nxs-icon { font-size: 22px; color: #f26c21; margin-top: 2px; flex-shrink: 0; }
.nxs-selected-banner .nxs-info { flex: 1; min-width: 0; }
.nxs-selected-banner .nxs-info .nxs-name { font-weight: 700; color: #202020; font-size: 13px; line-height: 1.3; }
.nxs-selected-banner .nxs-info .nxs-addr { color: #555; font-size: 12px; margin-top: 2px; line-height: 1.3; }
.nxs-selected-banner .nxs-change-btn {
    appearance: none !important; border: 1px solid #f26c21 !important; background: #fff !important;
    color: #f26c21 !important; border-radius: 6px !important; padding: 4px 10px !important; font-weight: 600;
    cursor: pointer; white-space: nowrap; font-size: 11px !important;
    width: auto !important; min-width: 0 !important; align-self: flex-start;
}
.nxs-selected-banner .nxs-change-btn:hover { background: #f26c21 !important; color: #fff !important; }

/* ── Selector principal ── */
.nxs-selector {
    display: block;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}
.nxs-selector.has-selection { display: none; }

/* Barra de búsqueda */
.nxs-search-bar {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
    padding: 12px 14px;
    background: #fafafa;
    border-bottom: 1px solid #e0e0e0;
}
/* Fila superior: input + select + GPS en línea */
.nxs-search-row {
    display: flex;
    gap: 6px;
    align-items: center;
    width: 100%;
}
.nxs-search-bar input[type="text"] {
    flex: 1 !important; min-width: 100px; padding: 9px 10px !important;
    border: 1px solid #cfcfcf !important; border-radius: 8px !important; font-size: 13px !important;
    width: auto !important;
}
.nxs-search-bar select {
    padding: 9px 8px !important; border: 1px solid #cfcfcf !important; border-radius: 8px !important; font-size: 13px !important;
    max-width: 100px; width: auto !important;
}
.nxs-search-bar .nxs-btn {
    appearance: none; border: none; border-radius: 8px;
    font-weight: 700; cursor: pointer; white-space: nowrap;
}
.nxs-btn-search {
    background: #f26c21; color: #fff; width: 100%;
    padding: 10px 14px; font-size: 13px;
}
.nxs-btn-search:hover { background: #d85a15; }
.nxs-btn-gps {
    background: #1a73e8 !important; color: #fff !important;
    width: 38px !important; height: 38px !important; min-width: 38px !important;
    max-width: 38px !important;
    padding: 0 !important; display: flex !important; align-items: center; justify-content: center;
    border-radius: 8px !important; flex-shrink: 0;
}
.nxs-btn-gps:hover { background: #1558b0; }

/* Panel mapa + lista */
.nxs-map-list-panel {
    display: flex;
    height: 420px;
}
.nxs-list-col {
    width: 320px;
    min-width: 280px;
    overflow-y: auto;
    border-right: 1px solid #e0e0e0;
    padding: 10px;
    background: #fff;
}
.nxs-map-col {
    flex: 1;
    position: relative;
    min-height: 300px;
    height: 100%;
}
#nxs-leaflet-map { width: 100%; height: 100%; min-height: 300px; }

/* Tarjetas de resultado */
.nxs-point-card {
    border: 1px solid #e0e0e0; border-radius: 8px;
    padding: 10px 12px; margin-bottom: 8px; cursor: pointer;
    transition: border-color .15s, box-shadow .15s; background: #fff;
}
.nxs-point-card:hover, .nxs-point-card.active {
    border-color: #f26c21; box-shadow: 0 2px 8px rgba(242,108,33,.15);
}
.nxs-point-card .nxs-card-name { font-weight: 700; font-size: 13px; color: #333; }
.nxs-point-card .nxs-card-alias { font-size: 11px; color: #999; }
.nxs-point-card .nxs-card-addr { font-size: 12px; color: #555; margin-top: 3px; }
.nxs-point-card .nxs-card-select {
    margin-top: 8px; width: 100%; padding: 7px;
    background: #f26c21; color: #fff; border: none; border-radius: 6px;
    cursor: pointer; font-size: 13px; font-weight: 600;
}
.nxs-point-card .nxs-card-select:hover { background: #d85a15; }

.nxs-placeholder { text-align: center; color: #999; padding: 40px 16px; font-size: 14px; }
.nxs-loading { text-align: center; color: #f26c21; padding: 30px 16px; font-size: 14px; }

/* Error */
.nacexshop-shell .error { font-size: 13px; display: none; color: #c62828 !important; }
.nacexshop-search-error { padding: 4px 16px 0; }

/* Legacy compat */
.respuesta_lista_puntos_nacexshop { display: none; }

/* Responsive */
@media (max-width: 768px) {
    .nxs-map-list-panel { flex-direction: column; height: auto; }
    .nxs-list-col { width: 100%; max-height: 250px; border-right: none; border-bottom: 1px solid #e0e0e0; }
    .nxs-map-col { min-height: 300px; height: 300px; width: 100%; }
    #nxs-leaflet-map { min-height: 300px; height: 300px; }
    .nxs-search-bar { flex-direction: column; }
    .nxs-search-bar input[type="text"],
    .nxs-search-bar select,
    .nxs-search-bar .nxs-btn { width: 100%; }
}

