fix: Ajuste de visibilidad del buscador en móvil (conservando estética original)
This commit is contained in:
@ -995,68 +995,79 @@ function clearNavigation() {
|
||||
|
||||
<!-- Uber-style Search Panel -->
|
||||
<Transition name="uber-slide">
|
||||
<div v-if="showUberSearch" class="uber-search-panel stark-hud-panel">
|
||||
<div class="hud-header">
|
||||
<button class="hud-close-btn" @click="closeUberSearch">
|
||||
<div v-if="showUberSearch" class="uber-search-panel" :class="{ 'is-focused': isInputFocused }">
|
||||
<div class="uber-search-header">
|
||||
<button class="back-btn" @click="closeUberSearch">
|
||||
<span class="material-icons">arrow_back</span>
|
||||
</button>
|
||||
<div class="hud-title">PLANIFICAR VIAJE</div>
|
||||
<div class="search-title">Planear viaje</div>
|
||||
</div>
|
||||
|
||||
<div class="hud-search-box">
|
||||
<div class="hud-inputs">
|
||||
<div class="hud-input-row">
|
||||
<span class="material-icons hud-icon origin">my_location</span>
|
||||
<div class="search-inputs-wrapper">
|
||||
<div class="location-line">
|
||||
<div class="dot-origin"></div>
|
||||
<div class="line"></div>
|
||||
<div class="dot-dest"></div>
|
||||
</div>
|
||||
|
||||
<div class="inputs-column">
|
||||
<div class="input-group">
|
||||
<input
|
||||
type="text"
|
||||
v-model="originQuery"
|
||||
class="hud-input"
|
||||
type="text"
|
||||
placeholder="Mi ubicación"
|
||||
class="uber-input"
|
||||
readonly
|
||||
>
|
||||
</div>
|
||||
<div class="hud-connector"></div>
|
||||
<div class="hud-input-row">
|
||||
<span class="material-icons hud-icon dest">location_on</span>
|
||||
<div class="input-group">
|
||||
<input
|
||||
type="text"
|
||||
v-model="destinationQuery"
|
||||
class="hud-input highlight"
|
||||
:placeholder="t('map.where_to')"
|
||||
type="text"
|
||||
placeholder="¿A dónde vamos?"
|
||||
class="uber-input focusable"
|
||||
autofocus
|
||||
@focus="onInputFocus"
|
||||
@blur="onInputBlur"
|
||||
>
|
||||
<button v-if="destinationQuery" @click="destinationQuery = ''" class="clear-btn">
|
||||
<span class="material-icons">close</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="hud-options">
|
||||
<button class="hud-clear-btn" @click="clearAllMapData">
|
||||
<span class="material-icons">layers_clear</span>
|
||||
<span>LIMPIAR MAPA</span>
|
||||
</button>
|
||||
|
||||
<label class="hud-toggle">
|
||||
<div class="search-options">
|
||||
<label class="route-toggle">
|
||||
<input type="checkbox" v-model="showRoutesToggle">
|
||||
<span class="hud-toggle-text">VER RUTAS</span>
|
||||
<span>Ver Rutas</span>
|
||||
</label>
|
||||
<button
|
||||
v-if="routeStore.selectedRouteId || markers.length > 0"
|
||||
class="clear-map-btn"
|
||||
@click="clearAllMapData"
|
||||
>
|
||||
<span class="material-icons">layers_clear</span>
|
||||
Limpiar Mapa
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Results -->
|
||||
<div v-if="filteredSearchResults.length > 0" class="hud-results">
|
||||
<div v-if="filteredSearchResults.length > 0" class="uber-results">
|
||||
<div
|
||||
v-for="stop in filteredSearchResults"
|
||||
:key="stop.id"
|
||||
class="hud-result-item"
|
||||
class="uber-result-item"
|
||||
@click="selectStopFromSearch(stop)"
|
||||
>
|
||||
<div class="hud-result-icon">
|
||||
<div class="result-icon">
|
||||
<span class="material-icons">directions_bus</span>
|
||||
</div>
|
||||
<div class="hud-result-info">
|
||||
<div class="hud-result-name">{{ stop.name }}</div>
|
||||
<div class="hud-result-desc">Parada de Autobús</div>
|
||||
<div class="result-content">
|
||||
<div class="result-name">{{ stop.name }}</div>
|
||||
<div class="result-address">Parada de Autobús</div>
|
||||
</div>
|
||||
<span class="material-icons hud-go-icon">chevron_right</span>
|
||||
<span class="material-icons check-icon">chevron_right</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -1547,216 +1558,119 @@ function clearNavigation() {
|
||||
letter-spacing: -0.01em;
|
||||
}
|
||||
|
||||
.stark-hud-panel {
|
||||
.uber-search-panel {
|
||||
position: fixed;
|
||||
top: 15px;
|
||||
left: 15px;
|
||||
right: 15px;
|
||||
background: #0f172a; /* Solid Deep Navy */
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 20px;
|
||||
padding: 16px;
|
||||
top: 15px; /* Pequeño margen para que no choque con el borde */
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: var(--header-bg);
|
||||
backdrop-filter: blur(30px);
|
||||
-webkit-backdrop-filter: blur(30px);
|
||||
border-radius: 24px;
|
||||
box-shadow: 0 40px 100px rgba(0,0,0,0.6);
|
||||
padding: 24px;
|
||||
z-index: 2500;
|
||||
box-shadow: 0 20px 50px rgba(0,0,0,0.5);
|
||||
border: 1px solid var(--border-color);
|
||||
transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 15px;
|
||||
max-width: 500px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
/* Elevación Stark al enfocar teclado */
|
||||
.stark-hud-panel.elevated,
|
||||
.stark-hud-panel:focus-within {
|
||||
/* Fix para que no se oculte al salir el teclado */
|
||||
.uber-search-panel.is-focused {
|
||||
top: 5px; /* Se pega más arriba pero sigue visible */
|
||||
transform: translateY(-5px);
|
||||
border-color: var(--active-color);
|
||||
box-shadow: 0 10px 30px rgba(254, 231, 21, 0.15);
|
||||
box-shadow: 0 10px 40px rgba(0,0,0,0.4);
|
||||
}
|
||||
|
||||
.hud-header {
|
||||
.uber-search-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.hud-close-btn {
|
||||
.back-btn {
|
||||
background: var(--hover-bg);
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
color: var(--text-primary);
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
border-radius: 10px;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 12px;
|
||||
margin-right: 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.hud-title {
|
||||
font-size: 13px;
|
||||
font-weight: 900;
|
||||
letter-spacing: 1.5px;
|
||||
color: var(--active-color);
|
||||
.search-title {
|
||||
font-size: 1.4rem;
|
||||
font-weight: 800;
|
||||
color: var(--text-primary);
|
||||
letter-spacing: -0.02em;
|
||||
}
|
||||
|
||||
.hud-search-box {
|
||||
.search-inputs-wrapper {
|
||||
display: flex;
|
||||
gap: 20px;
|
||||
background: var(--bg-secondary);
|
||||
border-radius: 15px;
|
||||
padding: 12px;
|
||||
padding: 20px;
|
||||
border-radius: 16px;
|
||||
margin-bottom: 16px;
|
||||
border: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
.hud-inputs {
|
||||
.location-line {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.hud-input-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
background: rgba(255,255,255,0.03);
|
||||
padding: 8px 12px;
|
||||
border-radius: 10px;
|
||||
border: 1px solid transparent;
|
||||
transition: all 0.3s;
|
||||
padding-top: 15px;
|
||||
}
|
||||
|
||||
.hud-input-row:focus-within {
|
||||
background: rgba(254, 231, 21, 0.05);
|
||||
border-color: var(--active-color);
|
||||
.dot-origin {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
border-radius: 50%;
|
||||
background: var(--active-color);
|
||||
box-shadow: 0 0 10px var(--active-color);
|
||||
}
|
||||
|
||||
.hud-icon {
|
||||
font-size: 18px;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.hud-icon.origin { color: #3b82f6; } /* Blue for origin */
|
||||
.hud-icon.dest { color: var(--active-color); } /* Yellow for destination */
|
||||
|
||||
.hud-input {
|
||||
background: transparent;
|
||||
border: none;
|
||||
color: var(--text-primary);
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
width: 100%;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.hud-connector {
|
||||
position: absolute;
|
||||
left: 20px;
|
||||
top: 35px;
|
||||
.line {
|
||||
width: 2px;
|
||||
height: 15px;
|
||||
background: var(--border-color);
|
||||
z-index: 1;
|
||||
height: 45px;
|
||||
background: linear-gradient(to bottom, var(--active-color), var(--border-color));
|
||||
margin: 4px 0;
|
||||
}
|
||||
|
||||
.hud-options {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding-top: 5px;
|
||||
.dot-dest {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
border-radius: 2px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.hud-clear-btn {
|
||||
background: rgba(239, 68, 68, 0.1);
|
||||
color: #ef4444;
|
||||
border: 1px solid rgba(239, 68, 68, 0.2);
|
||||
padding: 8px 12px;
|
||||
border-radius: 10px;
|
||||
font-size: 11px;
|
||||
font-weight: 800;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.hud-toggle {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.hud-toggle input {
|
||||
accent-color: var(--active-color);
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
.hud-toggle-text {
|
||||
font-size: 11px;
|
||||
font-weight: 800;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.hud-results {
|
||||
margin-top: 10px;
|
||||
max-height: 40vh;
|
||||
overflow-y: auto;
|
||||
.inputs-column {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 5px;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.hud-result-item {
|
||||
.input-group {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
padding: 12px;
|
||||
background: var(--bg-secondary);
|
||||
}
|
||||
|
||||
.uber-input {
|
||||
width: 100%;
|
||||
background: rgba(255, 255, 255, 0.03);
|
||||
border: 1px solid var(--border-color);
|
||||
padding: 12px 16px;
|
||||
border-radius: 12px;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
|
||||
.hud-result-item:hover {
|
||||
background: var(--hover-bg);
|
||||
border-color: var(--border-color);
|
||||
transform: translateX(4px);
|
||||
}
|
||||
|
||||
.hud-result-icon {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
background: rgba(254, 231, 21, 0.1);
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: var(--active-color);
|
||||
}
|
||||
|
||||
.hud-result-info {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.hud-result-name {
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
font-size: 1rem;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.hud-result-desc {
|
||||
font-size: 11px;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.hud-go-icon {
|
||||
font-size: 18px;
|
||||
color: var(--text-secondary);
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.uber-input:focus {
|
||||
background: rgba(255, 255, 255, 0.07);
|
||||
border-color: var(--active-color);
|
||||
|
||||
Reference in New Issue
Block a user