
/* ══════════════════════════════════════════════
   WELCOME OVERLAY
══════════════════════════════════════════════ */
#mapita-welcome-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: welcomeFadeIn 0.3s ease;
}
#mapita-welcome-overlay.hidden { display: none; }

@keyframes welcomeFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

#mapita-welcome-card {
    background: #fff;
    border-radius: 20px;
    padding: 36px 32px 28px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 24px 60px rgba(0,0,0,0.35);
    position: relative;
    text-align: center;
    animation: welcomeSlideUp 0.35s cubic-bezier(.34,1.56,.64,1);
}

@keyframes welcomeSlideUp {
    from { transform: translateY(40px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

#mapita-welcome-close {
    position: absolute;
    top: 14px; right: 16px;
    background: none; border: none;
    font-size: 18px; color: #9ca3af;
    cursor: pointer; padding: 4px 8px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}
#mapita-welcome-close:hover { color: #374151; background: #f3f4f6; }

#mapita-welcome-logo {
    font-size: 48px;
    margin-bottom: 12px;
    line-height: 1;
}

#mapita-welcome-title {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 800;
    color: #1B3B6F;
    line-height: 1.3;
}

#mapita-welcome-sub {
    margin: 0 0 16px;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
}

/* Línea secundaria en inglés */
.welcome-lang-en {
    display: block;
    font-size: 0.72em;
    font-weight: 500;
    color: #9ca3af;
    margin-top: 2px;
    letter-spacing: 0.01em;
}

/* ── Selector de región ─────────────────────────────────────────── */
#mapita-welcome-region-wrap {
    margin-bottom: 12px;
    text-align: left;
}

#mapita-welcome-region-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 5px;
}

#mapita-welcome-region {
    width: 100%;
    padding: 9px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    color: #374151;
    background: #fff;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239ca3af' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
#mapita-welcome-region:focus { border-color: #1B3B6F; }

#mapita-welcome-input-wrap {
    position: relative;
    margin-bottom: 14px;
}

#mapita-welcome-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
#mapita-welcome-input:focus { border-color: #1B3B6F; }

#mapita-welcome-suggestions {
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
    display: none;
}
#mapita-welcome-suggestions.open { display: block; }

.welcome-suggestion-item {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 13px;
    color: #374151;
    text-align: left;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.15s;
}
.welcome-suggestion-item:last-child { border-bottom: none; }
.welcome-suggestion-item:hover,
.welcome-suggestion-item.active { background: #eff6ff; color: #1B3B6F; }

#mapita-welcome-btn {
    width: 100%;
    padding: 13px 0;
    background: #1B3B6F;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    margin-bottom: 14px;
}
#mapita-welcome-btn:disabled {
    background: #93c5fd;
    cursor: not-allowed;
}
#mapita-welcome-btn:not(:disabled):hover {
    background: #14306b;
    transform: translateY(-1px);
}

#mapita-welcome-skip {
    margin: 0;
    font-size: 12px;
    color: #9ca3af;
}
#mapita-welcome-skip-link {
    color: #6b7280;
    text-decoration: underline;
    cursor: pointer;
}
#mapita-welcome-skip-link:hover { color: #374151; }

/* ══════════════════════════════════════════════
   TOAST MOTIVACIONAL
══════════════════════════════════════════════ */
#mapita-first-toast {
    position: fixed;
    bottom: 80px;
    right: 16px;
    background: #1B3B6F;
    color: #fff;
    padding: 12px 16px 12px 14px;
    border-radius: 14px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.28);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    max-width: 300px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    z-index: 99998;
}
/* Oculto de verdad: display none — sin animación, sin flash */
#mapita-first-toast.hidden {
    display: none !important;
}
/* Solo anima cuando se muestra explícitamente */
#mapita-first-toast.toast-visible {
    animation: toastSlideIn 0.4s cubic-bezier(.34,1.56,.64,1);
}

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(60px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* Palabras destacadas: Negocio / Marca */
.toast-highlight {
    color: #D4AF37;
    font-weight: 800;
    font-style: italic;
    font-size: 1.05em;
    letter-spacing: 0.01em;
}

#mapita-toast-icon { font-size: 20px; flex-shrink: 0; margin-top: 1px; }

#mapita-toast-close {
    background: none; border: none;
    color: rgba(255,255,255,0.6);
    font-size: 14px; cursor: pointer;
    padding: 0; margin-left: auto;
    flex-shrink: 0; align-self: flex-start;
    transition: color 0.2s;
}
#mapita-toast-close:hover { color: #fff; }

/* ── Separador "o" ─────────────────────────────────────────────── */
.welcome-or-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 0;
    color: #d1d5db;
    font-size: 12px;
}
.welcome-or-divider::before,
.welcome-or-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}
.welcome-or-divider span { color: #9ca3af; font-weight: 600; }

/* ── Botón GPS ──────────────────────────────────────────────────── */
#mapita-welcome-gps-btn {
    width: 100%;
    padding: 11px 0;
    background: #fff;
    color: #059669;
    border: 2px solid #059669;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, transform 0.15s;
    margin-bottom: 10px;
}
#mapita-welcome-gps-btn:hover {
    background: #ecfdf5;
    transform: translateY(-1px);
}
#mapita-welcome-gps-btn:disabled {
    color: #9ca3af;
    border-color: #d1d5db;
    cursor: not-allowed;
    transform: none;
}
#mapita-welcome-gps-btn.loading {
    color: #9ca3af;
    border-color: #d1d5db;
    cursor: wait;
}

/* ── Mensaje de error GPS ───────────────────────────────────────── */
#mapita-welcome-gps-error {
    margin: -6px 0 8px;
    font-size: 12px;
    color: #dc2626;
    line-height: 1.4;
}
#mapita-welcome-gps-error.hidden { display: none; }

/* ── CTA Registro ───────────────────────────────────────────────── */
#mapita-welcome-register-cta {
    margin-top: 16px;
    background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
    border: 1.5px solid #bfdbfe;
    border-radius: 14px;
    padding: 14px 16px 12px;
    text-align: center;
}
.welcome-register-icon {
    font-size: 22px;
    margin-bottom: 6px;
}
.welcome-register-msg {
    margin: 0 0 10px;
    font-size: 12.5px;
    color: #374151;
    line-height: 1.5;
}
.welcome-register-msg strong {
    color: #1B3B6F;
    font-size: 13.5px;
    display: block;
    margin-bottom: 3px;
}
#mapita-welcome-register-btn {
    display: block;
    width: 100%;
    padding: 11px 0;
    background: linear-gradient(135deg, #1B3B6F 0%, #2563eb 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
    box-sizing: border-box;
    letter-spacing: 0.02em;
}
#mapita-welcome-register-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}
.welcome-register-login {
    margin: 8px 0 0;
    font-size: 11px;
    color: #9ca3af;
}
.welcome-register-login a {
    color: #2563eb;
    text-decoration: underline;
    font-weight: 600;
}

/* Mobile */
@media (max-width: 480px) {
    #mapita-welcome-card {
        padding: 28px 20px 22px;
        border-radius: 16px;
    }
    #mapita-welcome-title { font-size: 19px; }
    #mapita-first-toast {
        bottom: 70px;
        right: 10px;
        left: 10px;
        max-width: none;
        font-size: 15px;
        padding: 14px 16px 14px 14px;
        line-height: 1.5;
    }
}

/* ══ FILTROS INMOBILIARIAS ══════════════════════════════════════════════════ */
.inm-f-btn {
    padding: 4px 9px;
    border: 1.5px solid #d1d5db;
    border-radius: 7px;
    background: #fff;
    color: #374151;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all .15s;
    line-height: 1.3;
}
.inm-f-btn:hover { background: #f0f4ff; border-color: #6366f1; color: #4f46e5; }
.inm-f-btn--on {
    background: #1B3B6F !important;
    border-color: #1B3B6F !important;
    color: #fff !important;
}

.inm-f-preset {
    padding: 3px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    color: #6b7280;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all .15s;
}
.inm-f-preset:hover { background: #eff6ff; color: #1B3B6F; border-color: #bfdbfe; }
.inm-f-preset--clear { color: #ef4444; border-color: #fecaca; }
.inm-f-preset--clear:hover { background: #fef2f2; color: #dc2626; border-color: #fca5a5; }
